A simple content frame implementation with navigation support.
Наследование: System.Windows.Controls.ContentControl
Пример #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\Cwa-Engine\SemesterAverage.xaml"
                ((Companion_1._0.Cwa_Engine.SemesterAverage)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.cboProgram = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.cboLevel = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.cboSemester = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.frame = ((FirstFloor.ModernUI.Windows.Controls.ModernFrame)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (_linkList != null)
            {
                _linkList.SelectionChanged -= OnLinkListSelectionChanged;
            }

            if (Frame != null)
            {
                Frame.Navigated -= Frame_Navigated;
            }

            _linkList = GetTemplateChild(@"PART_LinkList") as ListBox;
            Frame     = GetTemplateChild(@"PART_Frame") as ModernFrame;

            if (_linkList != null)
            {
                _linkList.SelectionChanged += OnLinkListSelectionChanged;
            }

            if (Frame != null)
            {
                Frame.Navigated += Frame_Navigated;
            }

            UpdateSelection(false);
        }
Пример #3
0
 private void RegisterChildFrame(ModernFrame frame)
 {
     // do not register existing frame
     if (GetChildFrames().Contains(frame))
     {
         return;
     }
     _childFrames.Add(new WeakReference <ModernFrame>(frame));
 }
Пример #4
0
        private void RegisterChildFrame(ModernFrame frame)
        {
            if (!GetChildFrames().Contains(frame))
            {
                var r = new WeakReference(frame);

                childFrames.Add(r);
            }
        }
Пример #5
0
        private void RegisterChildFrame(ModernFrame frame)
        {
            // do not register existing frame
            if (!GetChildFrames().Contains(frame))
            {
                var r = new WeakReference(frame);

                this.childFrames.Add(r);
            }
        }
Пример #6
0
        private void RegisterChildFrame(ModernFrame frame)
        {
            // do not register existing frame
            if (!GetChildFrames().Contains(frame))
            {
#if NET4
                var r = new WeakReference(frame);
#else
                var r = new WeakReference <ModernFrame>(frame);
#endif
                this.childFrames.Add(r);
            }
        }
Пример #7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Frame = ((FirstFloor.ModernUI.Windows.Controls.ModernFrame)(target));

            #line 16 "..\..\..\Content\ControlsModernFrame.xaml"
                this.Frame.FragmentNavigation += new System.EventHandler <FirstFloor.ModernUI.Windows.Navigation.FragmentNavigationEventArgs>(this.Frame_FragmentNavigation);

            #line default
            #line hidden

            #line 17 "..\..\..\Content\ControlsModernFrame.xaml"
                this.Frame.Navigated += new System.EventHandler <FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs>(this.Frame_Navigated);

            #line default
            #line hidden

            #line 18 "..\..\..\Content\ControlsModernFrame.xaml"
                this.Frame.Navigating += new System.EventHandler <FirstFloor.ModernUI.Windows.Navigation.NavigatingCancelEventArgs>(this.Frame_Navigating);

            #line default
            #line hidden

            #line 19 "..\..\..\Content\ControlsModernFrame.xaml"
                this.Frame.NavigationFailed += new System.EventHandler <FirstFloor.ModernUI.Windows.Navigation.NavigationFailedEventArgs>(this.Frame_NavigationFailed);

            #line default
            #line hidden
                return;

            case 2:

            #line 28 "..\..\..\Content\ControlsModernFrame.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.TextEvents = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\..\Cwa-Engine\MainWindowFrame.xaml"
                ((Companion_1._0.Cwa_Engine.MainWindowFrame)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.windowFrame = ((FirstFloor.ModernUI.Windows.Controls.ModernFrame)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #9
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (_frame != null)
            {
                _frame.Navigating -= OnFrameNavigating;
                _frame.Navigated  -= OnFrameNavigated;
            }

            _frame = GetTemplateChild(@"ContentFrame") as ModernFrame;

            if (_frame != null)
            {
                _frame.Navigating += OnFrameNavigating;
                _frame.Navigated  += OnFrameNavigated;
            }

            _menu = GetTemplateChild(@"PART_Menu") as ModernMenu;
        }
Пример #10
0
        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate().
        /// </summary>
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            currentModernFrame = (ModernFrame)GetTemplateChild("ContentFrame");
        }
Пример #11
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Frame = ((FirstFloor.ModernUI.Windows.Controls.ModernFrame)(target));
     
     #line 17 "..\..\..\Content\ControlsModernFrame.xaml"
     this.Frame.FragmentNavigation += new System.EventHandler<FirstFloor.ModernUI.Windows.Navigation.FragmentNavigationEventArgs>(this.Frame_FragmentNavigation);
     
     #line default
     #line hidden
     
     #line 18 "..\..\..\Content\ControlsModernFrame.xaml"
     this.Frame.Navigated += new System.EventHandler<FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs>(this.Frame_Navigated);
     
     #line default
     #line hidden
     
     #line 19 "..\..\..\Content\ControlsModernFrame.xaml"
     this.Frame.Navigating += new System.EventHandler<FirstFloor.ModernUI.Windows.Navigation.NavigatingCancelEventArgs>(this.Frame_Navigating);
     
     #line default
     #line hidden
     
     #line 20 "..\..\..\Content\ControlsModernFrame.xaml"
     this.Frame.NavigationFailed += new System.EventHandler<FirstFloor.ModernUI.Windows.Navigation.NavigationFailedEventArgs>(this.Frame_NavigationFailed);
     
     #line default
     #line hidden
     return;
     case 2:
     this.TextEvents = ((System.Windows.Controls.TextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #12
0
 private void RegisterChildFrame(ModernFrame frame) {
     // do not register existing frame
     if (GetChildFrames().Contains(frame)) return;
     _childFrames.Add(new WeakReference<ModernFrame>(frame));
 }
Пример #13
0
		private void RegisterChildFrame(ModernFrame frame)
		{
			// do not register existing frame
			if (!GetChildFrames().Contains(frame))
			{
				var r = new WeakReference(frame);

				this.childFrames.Add(r);
			}
		}
Пример #14
0
 public MainWindow()
 {
     frame = (ModernFrame)GetTemplateChild("ContentFrame");
     InitializeComponent();
 }
Пример #15
0
        public override void OnApplyTemplate() {
            base.OnApplyTemplate();

            if (_linkList != null) {
                _linkList.SelectionChanged -= OnLinkListSelectionChanged;
            }

            if (Frame != null) {
                Frame.Navigated -= Frame_Navigated;
            }

            _linkList = GetTemplateChild(@"PART_LinkList") as ListBox;
            Frame = GetTemplateChild(@"PART_Frame") as ModernFrame;

            if (_linkList != null) {
                _linkList.SelectionChanged += OnLinkListSelectionChanged;
            }

            if (Frame != null) {
                Frame.Navigated += Frame_Navigated;
            }

            UpdateSelection(false);
        }
Пример #16
0
        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate().
        /// </summary>
        public override void OnApplyTemplate() {
            base.OnApplyTemplate();
            
            if (_frame != null) {
                _frame.Navigated -= Frame_Navigated;
            }

            _frame = GetTemplateChild("ContentFrame") as ModernFrame;

            if (_frame != null) {
                _frame.Navigated += Frame_Navigated;
            }

            _menu = GetTemplateChild("PART_Menu") as ModernMenu;
        }