本文整理汇总了C#中WindowCreatedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# WindowCreatedEventArgs类的具体用法?C# WindowCreatedEventArgs怎么用?C# WindowCreatedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WindowCreatedEventArgs类属于命名空间,在下文中一共展示了WindowCreatedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
{
var generalSettingCmd = new SettingsCommand("general", "General", handler =>
{
var sf = new AppSettingsFlyout();
sf.Show();
});
var aboutSettingCmd = new SettingsCommand("about", "About", handler =>
{
var about = new AboutSettingFlyout();
about.Show();
});
var ppSettingCmd = new SettingsCommand("pp", "Privacy Policy", handler =>
{
Windows.System.Launcher.LaunchUriAsync(new Uri("http://sinhpham.github.io/PhotoGlider/"));
});
e.Request.ApplicationCommands.Add(generalSettingCmd);
e.Request.ApplicationCommands.Add(aboutSettingCmd);
e.Request.ApplicationCommands.Add(ppSettingCmd);
};
base.OnWindowCreated(args);
}
示例2: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
// This starts XAML Spy service
#if USE_XAML_SPY
this.service.StartService();
#endif
}
示例3: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
SettingsPane.GetForCurrentView().CommandsRequested += onCommandsRequested;
windowBounds = Window.Current.Bounds;
// Added to listen for events when the window size is updated.
Window.Current.SizeChanged += OnWindowSizeChanged;
base.OnWindowCreated(args);
}
示例4: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
var pane = Windows.ApplicationModel.Search.SearchPane.GetForCurrentView();
pane.ShowOnKeyboardInput = true;
pane.QuerySubmitted += OnAppQuerySubmitted;
pane.ResultSuggestionChosen += OnSearchPaneResultSuggestionChosen;
pane.SuggestionsRequested += OnSearchPaneSuggestionsRequested;
}
示例5: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
if (!listeningToEvents)
{
subscribeToFrameEvents(args.Window);
listeningToEvents = true;
}
base.OnWindowCreated(args);
}
示例6: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SettingsPane.GetForCurrentView().CommandsRequested +=
delegate(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs)
{
UICommandInvokedHandler handler = new UICommandInvokedHandler(OnSettingsCommand);
SettingsCommand generalCommand = new SettingsCommand("AccountsId", "Account", handler);
eventArgs.Request.ApplicationCommands.Add(generalCommand);
};
}
示例7: OnWindowCreated
protected override async void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SettingsPane.GetForCurrentView().CommandsRequested += App_CommandsRequested;
try
{
var status = await BackgroundExecutionManager.RequestAccessAsync();
}
catch
{
}
}
示例8: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
{
SettingsCommand defaultsCommand = new SettingsCommand("general", "خصائص عامة",
(handler) =>
{
var sf = new SettingsFlyout1();
sf.Show();
});
e.Request.ApplicationCommands.Add(defaultsCommand);
};
base.OnWindowCreated(args);
}
示例9: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
Windows.UI.ApplicationSettings.SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
{
var c = new Windows.UI.ApplicationSettings.SettingsCommand(1, "Options", o =>
{
new Views.Settings().Show();
});
e.Request.ApplicationCommands.Add(c);
}; base.OnWindowCreated(args);
}
示例10: OnWindowCreated
/// <summary>
/// Raises the WindowCreated event.
/// </summary>
/// <param name="args">The <see cref="WindowCreatedEventArgs"/> instance containing the event data.</param>
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
if (AppManifestHelper.IsSearchDeclared())
{
// Register the Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().QuerySubmitted
// event in OnWindowCreated to speed up searches once the application is already running
SearchPane.GetForCurrentView().QuerySubmitted += OnQuerySubmitted;
}
}
示例11: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
// Se usa para que cada vez que se cree la ventana se le cree un controlador de evento para la busqueda
SearchPane.GetForCurrentView().QuerySubmitted += App_QuerySubmitted;
// Share Charm Funcionality
DataTransferManager.GetForCurrentView().DataRequested += DataPage_dataRequest;
base.OnWindowCreated(args);
}
示例12: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SetupVisibilityHandler();
}
示例13: OnWindowCreated
// Handle einfügen, der den Aufruf der Datenschutzrichtlinie auslöst
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
if (CultureInfo.CurrentCulture.Name.Substring(0, 2) == "de")
{
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
e.Request.ApplicationCommands.Add(
new SettingsCommand("privacypolicy", "Datenschutz", ShowPrivacyPolicy)
);
}
else
{
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
e.Request.ApplicationCommands.Add(
new SettingsCommand("privacypolicy", "Privacy", ShowPrivacyPolicy)
);
}
}
示例14: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
SearchPane.GetForCurrentView().QuerySubmitted += OnSearchQuerySubmitted;
}
示例15: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs e)
{
// Load the custom app font and insert it into the Resources map
FontFamily appFont = new FontFamily("/Assets/MoMoPhoneSym.ttf#MoMoPhone Symbol");
Resources.Add("AppFont", appFont);
}