コード例 #1
0
ファイル: App.xaml.cs プロジェクト: WaffleSquirrel/More
        /// <summary>
        /// Creates the application host.
        /// </summary>
        /// <returns>An application <see cref="Host">host</see>.</returns>
        protected override Host CreateHost()
        {
            var host = new FrameHost<_view>();
            
            host.WithConfiguration<NavigationSettings>()
                .DependsOn<ShowShellView<FrameShellView<_view>>>()
                .Configure( ns => ns.CacheSize = 1 );

            return host;
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: WaffleSquirrel/More
        /// <summary>
        /// Creates the application host.
        /// </summary>
        /// <returns>An application <see cref="Host">host</see>.</returns>
        protected override Host CreateHost()
        {
            var host = new FrameHost<MainPage>();$if$ ($enableSettings$ == true)
            
            // adding an entry for the Settings contract (aka charm)
            host.WithConfiguration<ContractSettings>()
                .Configure( cs => cs.AddSetting( "Defaults", "DefaultSettings" ) );$endif$$if$ ($enableSearch$ == true)

            // enabling the Search contract (aka charm)
            host.WithConfiguration<ContractSettings>()
                .Configure( cs => cs.SearchOptions.PlaceholderText = "Enter your search" )
                .Configure( cs => cs.SearchOptions.ShowOnKeyboardInput = true );$endif$

            return host;
        }