Пример #1
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            ModernFrame parent = NavigationHelper.FindFrame(NavigationHelper.FrameParent, this);

            if (parent != null)
            {
                parent.RegisterChildFrame(this);
            }
        }
Пример #2
0
        private void RegisterChildFrame(ModernFrame frame)
        {
            // do not register existing frame
            if (!GetChildFrames().Contains(frame))
            {
#if NET4
                WeakReference r = new WeakReference(frame);
#else
                var r = new WeakReference <ModernFrame>(frame);
#endif
                childFrames.Add(r);
            }
        }