本文整理汇总了C#中Windows.ApplicationModel.Activation.SplashScreen类的典型用法代码示例。如果您正苦于以下问题:C# SplashScreen类的具体用法?C# SplashScreen怎么用?C# SplashScreen使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SplashScreen类属于Windows.ApplicationModel.Activation命名空间,在下文中一共展示了SplashScreen类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExtendedSplashScreen
public ExtendedSplashScreen(SplashScreen splashscreen)
{
InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This ensures that the extended splash screen formats properly in response to window resizing.
Window.Current.SizeChanged += ExtendedSplash_OnResize;
_splash = splashscreen;
if (_splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
_splash.Dismissed += DismissedEventHandler;
// Retrieve the window coordinates of the splash screen image.
_splashImageRect = _splash.ImageLocation;
PositionImage();
// If applicable, include a method for positioning a progress control.
PositionRing();
}
// Create a Frame to act as the navigation context
_rootFrame = new Frame();
this.Loaded += async (sender, args) => { await this.AppBootstrapper(); };
}
开发者ID:cjgaliana,项目名称:XamarinVideos,代码行数:27,代码来源:ExtendedSplashScreen.xaml.cs
示例2: ArrangeImage
private void ArrangeImage(SplashScreen splashScreen)
{
this.MyImage.Height = splashScreen.ImageLocation.Height;
this.MyImage.Width = splashScreen.ImageLocation.Width;
this.MyImage.SetValue(Canvas.LeftProperty, splashScreen.ImageLocation.X);
this.MyImage.SetValue(Canvas.TopProperty, splashScreen.ImageLocation.Y);
}
开发者ID:noriike,项目名称:xaml-106136,代码行数:7,代码来源:Splash.xaml.cs
示例3: ExtendedSplashPage
public ExtendedSplashPage(SplashScreen splashscreen, bool loadState) {
this.InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This ensures that the extended splash screen formats properly in response to window resizing.
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
// Is this a phone? Then set the scaling factor
if (String.Equals(AnalyticsInfo.VersionInfo.DeviceFamily, "Windows.Mobile")) {
scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
}
splash = splashscreen;
if (splash != null) {
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
// If applicable, include a method for positioning a progress control.
PositionRing();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame();
// Restore the saved session state if necessary
RestoreStateAsync(loadState);
}
开发者ID:Vedolin,项目名称:wheelmap-windows-app,代码行数:31,代码来源:Splashscreen.xaml.cs
示例4: ExtendedSplash
public ExtendedSplash(SplashScreen splashscreen, bool loadState)
{
InitializeComponent();
setuptitle();
LoginVM vm = this.DataContext as LoginVM;
STARTUP(vm);
// LearnMoreButton.Click += new RoutedEventHandler(LearnMoreButton_Click);
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc...
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
ScaleFactor = (double)DisplayInformation.GetForCurrentView().ResolutionScale / 100;
splash = splashscreen;
if (splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame();
// Restore the saved session state if necessary
RestoreStateAsync(loadState);
}
开发者ID:wouterDumon,项目名称:AppDevWindows-Gardnr,代码行数:32,代码来源:ExtendedSplash.xaml.cs
示例5: ExtendedSplash
private SplashScreen splash; // Variable to hold the splash screen object.
public ExtendedSplash(SplashScreen splashscreen)
{
InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc...
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
splash = splashscreen;
if (splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame() { Background = (SolidColorBrush)App.Current.Resources["AppBackgroundBrush"] };
rootFrame.Navigated += rootFrame_Navigated;
//DissmissStory.Begin();
}
开发者ID:fuchu,项目名称:LightNovelClientWindows,代码行数:27,代码来源:ExtendedSplash.xaml.cs
示例6: MyExtend1
public MyExtend1(SplashScreen splashscreen, bool loadState)
{
this.InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This ensures that the extended splash screen formats properly in response to window resizing.
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
splash = splashscreen;
if (splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
// If applicable, include a method for positioning a progress control.
PositionRing();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame();
// Restore the saved session state if necessary
RestoreStateAsync(loadState);
}
开发者ID:Qerts,项目名称:Projekt-Pollution-MKII,代码行数:28,代码来源:MyExtend1.xaml.cs
示例7: DismissedEventHandler
// Include code to be executed when the system has transitioned from the splash screen to the extended splash screen (application's first view).
async void DismissedEventHandler(SplashScreen sender, object e)
{
dismissed = true;
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
{
// Complete app setup operations here...
var connectionProfile = Windows.Networking.Connectivity.NetworkInformation.GetInternetConnectionProfile();
if (connectionProfile != null)
{
FeedDataSource feedDataSource = (FeedDataSource)App.Current.Resources["feedDataSource"];
if (feedDataSource != null)
{
if (feedDataSource.Feeds.Count == 0)
{
await feedDataSource.GetFeedsAsync();
}
}
}
else
{
var messageDialog = new Windows.UI.Popups.MessageDialog("An internet connection is needed to download feeds. Please check your connection and restart the app.");
var result = messageDialog.ShowAsync();
}
DismissExtendedSplash();
});
}
开发者ID:rebornix,项目名称:rebornix4windows,代码行数:30,代码来源:ExtendedSplash.xaml.cs
示例8: Init
/// <summary>
/// Place Splash Screen at the center of the page and register to the following events:
/// DataTransferManager -> DataRequested
/// SearchPane -> SuggestionsRequested, SearchPaneQuerySubmitted
/// SettingsPane -> CommandsRequested
/// NotesDataSource -> DataCompleted
/// </summary>
/// <param name="splashScreen">SplashScreen from IActivatedEventArgs</param>
async private void Init(SplashScreen splashScreen)
{
//if (!SampleDataSource.DataLoaded)
//{
// this.InitializeComponent();
// this.splashImageCoordinates = splashScreen.ImageLocation;
// this.splash = splashScreen;
// // Position the extended splash screen image in the same location as the splash screen image.
// this.loader.SetValue(Canvas.LeftProperty, this.splashImageCoordinates.X);
// this.loader.SetValue(Canvas.TopProperty, this.splashImageCoordinates.Y);
// this.loader.Height = this.splashImageCoordinates.Height;
// this.loader.Width = this.splashImageCoordinates.Width;
// DataTransferManager datatransferManager;
// datatransferManager = DataTransferManager.GetForCurrentView();
// datatransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested);
// Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
// SearchPane.GetForCurrentView().SuggestionsRequested += SearchPaneSuggestionsRequested;
// SearchPane.GetForCurrentView().QuerySubmitted += SearchPaneQuerySubmitted;
// SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
// NotesDataSource data = new NotesDataSource();
// data.Completed += Data_Completed;
// await data.Load();
//}
//else
//{
// Data_Completed(this, null);
//}
}
开发者ID:griffinfujioka,项目名称:Archive,代码行数:41,代码来源:Splash.xaml.cs
示例9: SplashPage
public SplashPage(SplashScreen splashscreen)
{
this.InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This ensures that the extended splash screen formats properly in response to window resizing.
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
scaleFactor = (double)DisplayInformation.GetForCurrentView().ResolutionScale / 100;
splash = splashscreen;
if (splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
// Optional: Add a progress ring to your splash screen to show users that content is loading
PositionRing();
}
}
开发者ID:danielbeckmann,项目名称:DotNETJumpStart,代码行数:25,代码来源:SplashPage.xaml.cs
示例10: ExtendedSplash
public ExtendedSplash(SplashScreen splashScreen, bool loadState)
{
this.InitializeComponent();
settings = new SettingsFlyout();
settings.Closed += settings_Closed;
SettingsPane.GetForCurrentView().CommandsRequested += BlankPage_CommandsRequested;
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc...
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(Current_SizeChanged);
_splash = splashScreen;
if (_splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
_splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
this.Loaded += ExtendedSplash_Loaded;
// Retrieve the window coordinates of the splash screen image.
splashImageRect = _splash.ImageLocation;
PositionImage();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame();
// Restore the saved session state if necessary
RestoreStateAsync(loadState);
}
开发者ID:bdecori,项目名称:win8,代码行数:34,代码来源:ExtendedSplash.xaml.cs
示例11: MainPage
public MainPage(SplashScreen splashScreen)
{
this.InitializeComponent();
splash = splashScreen;
OnResize();
Window.Current.SizeChanged += new WindowSizeChangedEventHandler((o, e) => OnResize());
//Window Visibility event handler
Window.Current.VisibilityChanged += OnWindowVisibilityChanged;
//added for share
dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager,
DataRequestedEventArgs>(this.ShareTextHandler);
WindowsGateway.ShareHighScore = ShareHighScore;
//added for extended splash screen
// ensure we listen to when unity tells us game is ready
WindowsGateway.UnityLoaded = OnUnityLoaded;
// create extended splash timer
extendedSplashTimer = new DispatcherTimer();
extendedSplashTimer.Interval = TimeSpan.FromMilliseconds(100);
extendedSplashTimer.Tick += ExtendedSplashTimer_Tick;
extendedSplashTimer.Start();
}
开发者ID:jaseporter01,项目名称:SumoBlocks,代码行数:27,代码来源:MainPage.xaml.cs
示例12: ExtendedSplash
public ExtendedSplash(SplashScreen splashscreen, bool loadState)
{
InitializeComponent();
timer = new Timer((param) => {
Dispatcher.RunAsync(CoreDispatcherPriority.Normal, ()=>{
// Navigate to mainpage
rootFrame.Navigate(typeof(MainPage));
// Place the frame in the current Window
Window.Current.Content = rootFrame;
});
}, null, 5000, 1);
// Listen for window resize events to reposition the extended splash screen image accordingly.
// This ensures that the extended splash screen formats properly in response to window resizing.
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
splash = splashscreen;
if (splash != null)
{
// Register an event handler to be executed when the splash screen has been dismissed.
splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);
// Retrieve the window coordinates of the splash screen image.
splashImageRect = splash.ImageLocation;
PositionImage();
// If applicable, include a method for positioning a progress control.
PositionRing();
}
// Create a Frame to act as the navigation context
rootFrame = new Frame();
}
开发者ID:gregkalapos,项目名称:LearningExam70-355,代码行数:35,代码来源:ExtendedSplash.xaml.cs
示例13: MainPage
public MainPage()
{
this.InitializeComponent();
NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Required;
AppCallbacks appCallbacks = AppCallbacks.Instance;
// Setup scripting bridge
_bridge = new WinRTBridge.WinRTBridge();
appCallbacks.SetBridge(_bridge);
appCallbacks.RenderingStarted += () => { RemoveSplashScreen(); };
#if !UNITY_WP_8_1
appCallbacks.SetKeyboardTriggerControl(this);
#endif
appCallbacks.SetSwapChainPanel(GetSwapChainPanel());
appCallbacks.SetCoreWindowEvents(Window.Current.CoreWindow);
appCallbacks.InitializeD3DXAML();
splash = ((App)App.Current).splashScreen;
GetSplashBackgroundColor();
OnResize();
onResizeHandler = new WindowSizeChangedEventHandler((o, e) => OnResize());
Window.Current.SizeChanged += onResizeHandler;
#if UNITY_WP_8_1
onRotationChangedHandler = new TypedEventHandler<DisplayInformation, object>((di, o) => { OnRotate(di); });
ExtendedSplashImage.RenderTransformOrigin = new Point(0.5, 0.5);
var displayInfo = DisplayInformation.GetForCurrentView();
displayInfo.OrientationChanged += onRotationChangedHandler;
OnRotate(displayInfo);
SetupLocationService();
#endif
}
开发者ID:Myfreedom614,项目名称:UWP-Samples,代码行数:35,代码来源:MainPage.xaml.cs
示例14: OnActivated
/// <summary>
/// Invoked when application is launched through protocol.
/// Read more - http://msdn.microsoft.com/library/windows/apps/br224742
/// </summary>
/// <param name="args"></param>
protected override void OnActivated(IActivatedEventArgs args)
{
//string appArgs = "";
//switch (args.Kind)
//{
// case ActivationKind.Protocol:
// ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
// splashScreen = eventArgs.SplashScreen;
// appArgs += string.Format("Uri={0}", eventArgs.Uri.AbsoluteUri);
// break;
//}
//InitializeUnity(appArgs);
string appArgs = "";
Windows.ApplicationModel.Activation.SplashScreen splashScreen = null;
switch (args.Kind)
{
case ActivationKind.Protocol:
ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
splashScreen = eventArgs.SplashScreen;
appArgs += string.Format("Uri={0}", eventArgs.Uri.AbsoluteUri);
break;
//Add VoiceCommand start detection and use the SpeechHelper handler
case ActivationKind.VoiceCommand:
SpeechHelper.HandleSpeechCommand(args);
break;
}
InitializeUnity(appArgs, splashScreen);
}
开发者ID:neilhighley,项目名称:inventorthon-unity-1,代码行数:36,代码来源:App.xaml.cs
示例15: Splash
public Splash(SplashScreen splashScreen)
{
InitializeComponent();
Window.Current.SizeChanged += (s, e) => Resize(splashScreen);
Resize(splashScreen);
Opacity = 0;
}
开发者ID:GFlisch,项目名称:Template10,代码行数:7,代码来源:Splash.xaml.cs
示例16: Splash
public Splash(SplashScreen splashScreen)
{
InitializeComponent();
Action resize = () =>
{
if (splashScreen.ImageLocation.Top == 0)
{
MyImage.Visibility = Visibility.Collapsed;
return;
}
else
{
MyCanvas.Background = null;
MyImage.Visibility = Visibility.Visible;
}
MyImage.Height = splashScreen.ImageLocation.Height;
MyImage.Width = splashScreen.ImageLocation.Width;
MyImage.SetValue(Canvas.TopProperty, splashScreen.ImageLocation.Top);
MyImage.SetValue(Canvas.LeftProperty, splashScreen.ImageLocation.Left);
ProgressTransform.TranslateY = MyImage.Height / 2;
};
Window.Current.SizeChanged += (s, e) => resize();
resize();
}
开发者ID:leo-mck,项目名称:Template10,代码行数:25,代码来源:Splash.xaml.cs
示例17: DismissedEventHandler
// Include code to be executed when the system has transitioned from the splash screen to the extended splash screen (application's first view).
void DismissedEventHandler(SplashScreen sender, object e)
{
// Navigate away from the app's extended splash screen after completing setup operations here...
if (!Dismissed)
{
Dismissed = true;
var task = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
{
Window.Current.Content = new AppShell { Language = ApplicationLanguages.Languages[0] };
ApplicationLanguages.PrimaryLanguageOverride = GlobalizationPreferences.Languages[0];
var shell = (AppShell) Window.Current.Content;
// When the navigation stack isn't restored, navigate to the first page
// suppressing the initial entrance animation.
var setup = new Setup(shell.MyAppFrame);
setup.Initialize();
var start = Mvx.Resolve<IMvxAppStart>();
start.Start();
shell.ViewModel = Mvx.Resolve<MenuViewModel>();
//If Jump Lists are supported, adds them
if (ApiInformation.IsTypePresent("Windows.UI.StartScreen.JumpList"))
{
await SetJumplist();
}
await CallRateReminder();
});
}
}
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:35,代码来源:ExtendedSplashScreen.xaml.cs
示例18: MainPage
public MainPage(SplashScreen splashScreen)
{
this.InitializeComponent();
// initialize extended splash
splash = splashScreen;
SetExtendedSplashBackgroundColor();
// ensure we are aware of app window being resized
OnResize();
Window.Current.SizeChanged += onResizeHandler = new WindowSizeChangedEventHandler((o, e) => OnResize(e));
Window.Current.VisibilityChanged += OnWindowVisibilityChanged;
// ensure we listen to when unity tells us game is ready
WindowsGateway.UnityLoaded = OnUnityLoaded;
// create extended splash timer
extendedSplashTimer = new DispatcherTimer();
extendedSplashTimer.Interval = TimeSpan.FromMilliseconds(100);
extendedSplashTimer.Tick += ExtendedSplashTimer_Tick;
extendedSplashTimer.Start();
// configure settings charm
settingsPane = SettingsPane.GetForCurrentView();
settingsPane.CommandsRequested += OnSettingsCommandsRequested;
// configure share charm
var dataTransferManager = DataTransferManager.GetForCurrentView();
dataTransferManager.DataRequested += DataTransferManager_DataRequested;
}
开发者ID:hmcaio,项目名称:UnityPorting,代码行数:31,代码来源:MainPage.xaml.cs
示例19: ExtendedSplash
public ExtendedSplash(SplashScreen splashscreen, bool loadState)
{
InitializeComponent();
// Listen for window resize events to reposition the extended _splash screen image accordingly.
// This is important to ensure that the extended _splash screen is formatted properly in response to snapping, unsnapping, rotation, etc...
Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash_OnResize);
_splash = splashscreen;
if (_splash != null)
{
// Register an event handler to be executed when the _splash screen has been Dismissed.
_splash.Dismissed += DismissedEventHandler;
// Retrieve the window coordinates of the _splash screen image.
SplashImageRect = _splash.ImageLocation;
PositionImage();
// Optional: Add a progress ring to your _splash screen to show users that content is loading
PositionRing();
}
// Create a Frame to act as the navigation context
RootFrame = new Frame();
// Restore the saved session state if necessary
Task.Run(async () => await RestoreStateAsync(loadState));
}
开发者ID:davidvidmar,项目名称:MobilnaPoraba,代码行数:29,代码来源:ExtendedSplash.xaml.cs
示例20: MainPage
public MainPage()
{
this.InitializeComponent();
NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Required;
AppCallbacks appCallbacks = AppCallbacks.Instance;
// Setup scripting bridge
_bridge = new WinRTBridge.WinRTBridge();
appCallbacks.SetBridge(_bridge);
appCallbacks.RenderingStarted += () => { RemoveSplashScreen(); };
#if !UNITY_WP_8_1
appCallbacks.SetKeyboardTriggerControl(this);
#endif
appCallbacks.SetSwapChainPanel(GetSwapChainPanel());
appCallbacks.SetCoreWindowEvents(Window.Current.CoreWindow);
appCallbacks.InitializeD3DXAML();
splash = ((App)App.Current).splashScreen;
GetSplashBackgroundColor();
OnResize();
onResizeHandler = new WindowSizeChangedEventHandler((o, e) => OnResize());
Window.Current.SizeChanged += onResizeHandler;
#if UNITY_WP_8_1
SetupLocationService();
#endif
Interop.LoadInterstitialEvent += Interop_LoadInterstitialEvent;
Interop.ShowInterstitialEvent += Interop_ShowInterstitialEvent;
}
开发者ID:AdDuplex,项目名称:AdDuplex-SDK-Samples,代码行数:31,代码来源:MainPage.xaml.cs
注:本文中的Windows.ApplicationModel.Activation.SplashScreen类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论