• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Controls.Frame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Controls.Frame的典型用法代码示例。如果您正苦于以下问题:C# Frame类的具体用法?C# Frame怎么用?C# Frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Frame类属于System.Windows.Controls命名空间,在下文中一共展示了Frame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Initialize

        public static void Initialize(MXApplication theApp, Frame navFrame)
        {
            MXContainer.InitializeContainer(new MXWindowsContainer(theApp));
            MXContainer.Instance.ThreadedLoad = false;

            NavigationFrame = navFrame;
        }
开发者ID:rsatter,项目名称:MonoCross,代码行数:7,代码来源:MXWindowsContainer.cs


示例2: MainWindowViewModel

        public MainWindowViewModel(Frame CurrentFrame, Dispatcher mainWindowDispatcher)
        {
            this.currentFrame = CurrentFrame;
            this.mainWindowDispatcher = mainWindowDispatcher;

            // Initialize Agle as soon as possible
            MyAgle = Agle.Agle.GetAgleInstance;
            MyAgle.InitializeAgle(this.mainWindowDispatcher);


            // Creating ViewModel for all related pages
            aglePageVM = new AglePageViewModel();

            selfCheckingPageVM = new SelfCheckingPageViewModel();

            titlePageVM = new TitlePageViewModel();
            titlePageVM.VideoFinishedEvent += this.OnTitlePageFinished;

            selfCheckingPageVM.AgleSystemStart += this.OnAgleSystemStart;

            // Ready navigating to title page, show starting movie
            TitlePage titlePage = new TitlePage();
            titlePage.InitializeTitlePage(this.titlePageVM);
            this.currentFrame.NavigationService.Navigate(titlePage);


           
        }
开发者ID:jzzfreedom,项目名称:Repo,代码行数:28,代码来源:MainWindowViewModel.cs


示例3: MainWindowViewModel

 public MainWindowViewModel(Frame frame)
 {
     MainFrame = frame;
     Loaded = new RelayCommand(e => Loaded_Method());
     SearchCommand = new RelayCommand(e => SearchCommand_Method());
     AccountClick = new RelayCommand(e => AccountClick_Method());
 }
开发者ID:AntonReytarovskiy,项目名称:Polaroid,代码行数:7,代码来源:MainWindowViewModel.cs


示例4: SetRootFrame

        public static void SetRootFrame(Frame rootFrame)
        {
            if (rootFrame == null)
                throw new ArgumentNullException("rootFrame", "rootFrame cannot be null.");

            _appRootFrame = rootFrame;
        }
开发者ID:pcrockett,项目名称:Ruminate,代码行数:7,代码来源:ViewReference.cs


示例5: AddOption

        private Button AddOption(string name, object source, string propertyName)
        {
            PageOptionItem pageOptionItem = new PageOptionItem();
            pageOptionItem.buttonOption.Content = name;
            Binding bd = new Binding(propertyName);
            bd.Source = source;
            bd.Mode = BindingMode.TwoWay;
            pageOptionItem.labelOptionStatus.SetBinding(Label.IsEnabledProperty, bd);
            pageOptionItem.buttonOption.Click +=
                delegate(object sender, RoutedEventArgs e)
                {
                    try
                    {
                        pageOptionItem.labelOptionStatus.IsEnabled =
                            !pageOptionItem.labelOptionStatus.IsEnabled;
                    }
                    catch
                    {
                    }
                };

            Frame frame = new Frame();
            frame.Content = pageOptionItem;
            stackPanel1.Children.Add(frame);

            return pageOptionItem.buttonOption;
        }
开发者ID:vesteksoftware,项目名称:VT5021,代码行数:27,代码来源:PageOption.xaml.cs


示例6: EnsureSampleAppApplication

 public static SampleAppApplication EnsureSampleAppApplication(Frame navigationContext)
 {
     SampleAppNavigator.Instance.NavigationContext = navigationContext;
     var app = SampleAppApplication.Instance ?? new SampleAppApplication(SampleAppNavigator.Instance);
     app.UseDesignViewModels = false; // By default, UseDesignViewModels is true in Debug build and false otherwise. Since this app has a built-in mock service, we never use design data at runtime.
     return app;
 }
开发者ID:rvdplas,项目名称:QuickCross,代码行数:7,代码来源:App.xaml.cs


示例7: PhoneApplicationServiceAdapter

 /// <summary>
 ///   Creates an instance of <see cref = "PhoneApplicationServiceAdapter" />.
 /// </summary>
 public PhoneApplicationServiceAdapter(Frame rootFrame) {
     service = PhoneApplicationService.Current;
     service.Launching += delegate { isResurrecting = false; };
     service.Activated += delegate {
         if(isResurrecting) {
             Resurrecting();
             NavigatedEventHandler onNavigated = null;
             onNavigated = (s2, e2) => {
                 Resurrected();
                 rootFrame.Navigated -= onNavigated;
             };
             rootFrame.Navigated += onNavigated;
             isResurrecting = false;
         }
         else {
             Continuing();
             NavigatedEventHandler onNavigated = null;
             onNavigated = (s2, e2) => {
                 Continued();
                 rootFrame.Navigated -= onNavigated;
             };
             rootFrame.Navigated += onNavigated;
         }
     };
 }
开发者ID:bryanhunter,项目名称:CaliburnMicroTalk,代码行数:28,代码来源:IPhoneService.cs


示例8: FrameNavigationService

 public FrameNavigationService([NotNull] Frame frame)
 {
     Should.NotBeNull(frame, "frame");
     _frame = frame;
     _frame.Navigating += OnNavigating;
     _frame.Navigated += OnNavigated;
 }
开发者ID:FilipHerman,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:FrameNavigationService.cs


示例9: SinglePage

        /// <summary>
        /// Erzeugt eine neue Seitenansicht mit einfacher Seite
        /// </summary>
        /// <param name="label">Titel der Seite</param>
        /// <param name="page">Instanz der anzuzeigenden Seite</param>
        public SinglePage(string label, KPage page)
        {
            MainWindow mainWindow = Application.Current.MainWindow as MainWindow;
            Frame frame = new Frame();
            Toolbar toolbar = new Toolbar(frame, page);
            ScrollableFrame scrollableFrame = new ScrollableFrame();
            ExtScrollViewer scrollViewer = scrollableFrame.createScrollableFrame(frame);

            DockPanel.SetDock(toolbar.dpToolbarPanel, Dock.Top);

            mainWindow.subNavigation.Children.Clear();

            frame.Margin = new Thickness(15, 0, 0, 0);
            frame.Content = page;
            page.parentFrame = frame;
            page.parentToolbar = toolbar;
            page.parentScrollViewer = scrollViewer;

            page.defineToolbarContent();

            mainWindow.contentPanel.Children.Clear();
            mainWindow.contentPanel.Children.Add(toolbar.dpToolbarPanel);
            mainWindow.contentPanel.Children.Add(scrollViewer);
            mainWindow.lbPageTitle.Content = label;
        }
开发者ID:ramteid,项目名称:KoeTaf,代码行数:30,代码来源:SinglePage.cs


示例10: pConnect

 public pConnect(Frame frame, ILogger log)
 {
     InitializeComponent();
     MainFrame = frame;
     logger = log;
     pageConnect = this;
 }
开发者ID:xxJohnxx,项目名称:DotDotBot,代码行数:7,代码来源:pConnect.xaml.cs


示例11: PanelAirlines

        public PanelAirlines()
        {
            WrapPanel buttonsPanel = new WrapPanel();

            // chs, 2011-18-10 added for different views / statistics for airlines
            ucSelectButton sbFlights = new ucSelectButton();
            sbFlights.Uid = "1001";
            sbFlights.Content = Translator.GetInstance().GetString("PanelAirlines", sbFlights.Uid);
            sbFlights.IsSelected = true;
            sbFlights.Click += new System.Windows.RoutedEventHandler(sbFlights_Click);
            buttonsPanel.Children.Add(sbFlights);

            ucSelectButton sbFinancial = new ucSelectButton();
            sbFinancial.Uid = "1002";
            sbFinancial.Content = Translator.GetInstance().GetString("PanelAirlines", sbFinancial.Uid);
            sbFinancial.Click += new System.Windows.RoutedEventHandler(sbFinancial_Click);
             buttonsPanel.Children.Add(sbFinancial);

            ucSelectButton sbFleet = new ucSelectButton();
            sbFleet.Uid = "1003";
            sbFleet.Content = Translator.GetInstance().GetString("PanelAirlines", sbFleet.Uid);
            sbFleet.Click += new System.Windows.RoutedEventHandler(sbFleet_Click);
            buttonsPanel.Children.Add(sbFleet);

            this.Children.Add(buttonsPanel);

            frameContent = new Frame();
            frameContent.NavigationUIVisibility = NavigationUIVisibility.Hidden;
            frameContent.Navigate(new PageAirlinesStatistics());

            this.Children.Add(frameContent);
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:32,代码来源:PanelAirlines.cs


示例12: EnsureMainFrame

        private bool EnsureMainFrame()
        {
            if (_mainFrame != null)
            {
                return true;
            }

            var mainPage = (Application.Current.RootVisual as MainPage);

            if (mainPage != null)
            {
                _mainFrame = mainPage.NavigationFrame;

                if (_mainFrame != null)
                {
                    // Could be null if the app runs inside a design tool
                    _mainFrame.Navigating += (s, e) =>
                    {
                        if (Navigating != null)
                        {
                            Navigating(s, e);
                        }
                    };

                    return true;
                }
            }

            return false;
        }
开发者ID:Maskl,项目名称:Flags,代码行数:30,代码来源:NavigationService.cs


示例13: MainWindow

 public MainWindow()
 {
     InitializeComponent();
     var uneFrame = new Frame();
     MainGrid.Children.Add(uneFrame);
     uneFrame.Navigate(new PageSwitcher());
 }
开发者ID:LeonGuo1,项目名称:SupErp,代码行数:7,代码来源:MainWindow.xaml.cs


示例14: SearchViewModel

 public SearchViewModel(Frame frame,string name)
 {
     MainFrame = frame;
     Name = name;
     Load_Search();
     SearchEnter = new RelayCommand(e => SearchEnter_Method());
 }
开发者ID:AntonReytarovskiy,项目名称:Polaroid,代码行数:7,代码来源:SearchViewModel.cs


示例15: switchPage

        /// <summary>
        /// Die anzuzeigende Seite wechseln
        /// Erstellt neue Instanzen anstatt existierende wieder zu verwenden, da es Probleme mit dem .net Framework gab
        /// </summary>
        /// <param name="label">Der Titel der neuen Seite</param>
        /// <param name="pageType">Der Typ der neuen Seite</param>
        /// <param name="args">Parameter für den Konstruktor der neuen Seite</param>
        public void switchPage(string label, Type pageType, params object[] args)
        {
            try
            {
                KPage page = (KPage)Activator.CreateInstance(pageType, args);

                Frame frame = new Frame();
                Toolbar toolbar = new Toolbar(frame, page);
                ScrollableFrame scrollableFrame = new ScrollableFrame();
                ExtScrollViewer extScrollViewer = scrollableFrame.createScrollableFrame(frame);
                frame.Margin = new Thickness(15, 0, 0, 0);

                DockPanel.SetDock(toolbar.dpToolbarPanel, Dock.Top);

                frame.Content = page;
                page.parentFrame = frame;
                page.parentToolbar = toolbar;
                page.parentScrollViewer = extScrollViewer;
                page.defineToolbarContent();

                this.contentPanel.Children.Clear();
                this.contentPanel.Children.Add(toolbar.dpToolbarPanel);
                this.contentPanel.Children.Add(extScrollViewer);
                this.lbPageTitle.Content = label;
            }
            catch
            {
            }
        }
开发者ID:ramteid,项目名称:KoeTaf,代码行数:36,代码来源:MainWindow.xaml.cs


示例16: Page1_Click

        private void Page1_Click(object sender, RoutedEventArgs e)
        {
            const string tabName = "Transactions";

            if (!TabExists(tabName))
            {
                TabItem tabitem = new TabItem();
                tabitem.Header = tabName ;
                Frame tabFrame = new Frame();
                Transactions page1 = new Transactions();
                tabFrame.Content = page1;
                tabitem.Content = tabFrame;
                tabitem.Name =tabName;
                tabControlView.Items.Add(tabitem);
                tabControlView.SelectedItem = tabitem;
            }
            else
            {
                List<TabItem> tabitem = (from TabItem item in tabControlView.Items
                                   where item.Name.Equals(tabName)
                                   select item).ToList();
                if (tabitem.Any())
                {
                    tabControlView.SelectedItem = tabitem.First();
                }

            }
                //MessageBox.Show("Tab is Already Open or Too Many Tabs", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
        }
开发者ID:sriharshakolluru,项目名称:Dinesh-Project,代码行数:29,代码来源:MainWindow.xaml.cs


示例17: PanelAirports

        public PanelAirports(PageAirports parent)
        {
            this.ParentPage = parent;

            WrapPanel buttonsPanel = new WrapPanel();

            ucSelectButton sbSearch = new ucSelectButton();
            sbSearch.Uid = "201";
            sbSearch.Content = Translator.GetInstance().GetString("PanelAirports", sbSearch.Uid);
            sbSearch.IsSelected = true;
            sbSearch.Click += new System.Windows.RoutedEventHandler(sbSearch_Click);
            buttonsPanel.Children.Add(sbSearch);

            ucSelectButton sbExtendedSearch = new ucSelectButton();
            sbExtendedSearch.Uid = "203";
            sbExtendedSearch.Content = Translator.GetInstance().GetString("PanelAirports", sbExtendedSearch.Uid);
            sbExtendedSearch.Click += new System.Windows.RoutedEventHandler(sbExtendedSearch_Click);
            buttonsPanel.Children.Add(sbExtendedSearch);

            ucSelectButton sbStatistics = new ucSelectButton();
            sbStatistics.Uid = "202";
            sbStatistics.Content = Translator.GetInstance().GetString("PanelAirports", sbStatistics.Uid);
            sbStatistics.Click += new System.Windows.RoutedEventHandler(sbStatistics_Click);
            buttonsPanel.Children.Add(sbStatistics);

            this.Children.Add(buttonsPanel);

            frameContent = new Frame();
            frameContent.NavigationUIVisibility = NavigationUIVisibility.Hidden;
            frameContent.Navigate(new PageSearchAirports(this.ParentPage));

            this.Children.Add(frameContent);
        }
开发者ID:pedromorgan,项目名称:theairlineproject-cs,代码行数:33,代码来源:PanelAirports.cs


示例18: switch

 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.framemain = ((System.Windows.Controls.Frame)(target));
     return;
     case 2:
     
     #line 7 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 8 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 9 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
开发者ID:JokerXM,项目名称:Sujet,代码行数:33,代码来源:MainWindow.g.cs


示例19: StateObserver

 public StateObserver(Frame frame)
 {
     _reference = new WeakReference(frame);
     _previousView = Empty.WeakReference;
     frame.Navigating += FrameOnNavigating;
     frame.Navigated += FrameOnNavigated;
 }
开发者ID:dbeattie71,项目名称:MugenMvvmToolkit,代码行数:7,代码来源:FrameStateManager.cs


示例20: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/OOAD_EDU;component/Views/Common/PageNavigationView.xaml", System.UriKind.Relative));
     this.ContentFrame = ((System.Windows.Controls.Frame)(this.FindName("ContentFrame")));
 }
开发者ID:CanhNguyenVan,项目名称:ooad-dev,代码行数:8,代码来源:PageNavigationView.g.cs



注:本文中的System.Windows.Controls.Frame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Controls.Grid类代码示例发布时间:2022-05-26
下一篇:
C# Controls.Expander类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap