当前位置: 首页>>代码示例>>C#>>正文


C# Controls.Frame类代码示例

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


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


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