本文整理汇总了C#中WindowCreatedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# WindowCreatedEventArgs类的具体用法?C# WindowCreatedEventArgs怎么用?C# WindowCreatedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WindowCreatedEventArgs类属于命名空间,在下文中一共展示了WindowCreatedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:sinhpham,项目名称:PhotoGlider,代码行数:25,代码来源:App.xaml.cs
示例2: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
// This starts XAML Spy service
#if USE_XAML_SPY
this.service.StartService();
#endif
}
开发者ID:prabaprakash,项目名称:Visual-Studio-2013,代码行数:9,代码来源:App.xaml.cs
示例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);
}
开发者ID:WebKoala,项目名称:W8BggApp,代码行数:9,代码来源:App.xaml.cs
示例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;
}
开发者ID:qwasar,项目名称:onebusaway-windows8,代码行数:10,代码来源:App.xaml.cs
示例5: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
if (!listeningToEvents)
{
subscribeToFrameEvents(args.Window);
listeningToEvents = true;
}
base.OnWindowCreated(args);
}
开发者ID:punker76,项目名称:XAMLResponsiveStyles,代码行数:10,代码来源:ResponsiveApp.cs
示例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);
};
}
开发者ID:anroOfCode,项目名称:reddit-w8-app,代码行数:12,代码来源:App.xaml.cs
示例7: OnWindowCreated
protected override async void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SettingsPane.GetForCurrentView().CommandsRequested += App_CommandsRequested;
try
{
var status = await BackgroundExecutionManager.RequestAccessAsync();
}
catch
{
}
}
开发者ID:Synergex,项目名称:Baconography,代码行数:12,代码来源:App.xaml.cs
示例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);
}
开发者ID:ReemAmeeri,项目名称:alfanous,代码行数:15,代码来源:App.xaml.cs
示例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);
}
开发者ID:noriike,项目名称:xaml-106136,代码行数:11,代码来源:App.xaml.cs
示例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;
}
}
开发者ID:restfulobjects,项目名称:restfulobjects-wsa,代码行数:13,代码来源:MvvmAppBase.cs
示例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);
}
开发者ID:Zhionit,项目名称:ModernUI,代码行数:10,代码来源:App.xaml.cs
示例12: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SetupVisibilityHandler();
}
开发者ID:maliroteh,项目名称:SalesforceMobileSDK-Windows,代码行数:5,代码来源:SalesforceApplication.cs
示例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)
);
}
}
开发者ID:tempestrock,项目名称:Kalaha,代码行数:18,代码来源:App.xaml.cs
示例14: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
SearchPane.GetForCurrentView().QuerySubmitted += OnSearchQuerySubmitted;
}
开发者ID:valdisiljuconoks,项目名称:ATMFinder,代码行数:7,代码来源:App.xaml.cs
示例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);
}
开发者ID:jm991,项目名称:Helios,代码行数:6,代码来源:App.xaml.cs
示例16: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
}
开发者ID:bospoort,项目名称:Win10UWPDemo,代码行数:3,代码来源:App.xaml.cs
示例17: OnWindowCreated
/// <summary>
/// Raises the <see cref="E:WindowCreated" /> event.
/// </summary>
/// <param name="args">The <see cref="WindowCreatedEventArgs"/> instance containing the event data.</param>
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
#if WINDOWS_APP
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
{
e.Request.ApplicationCommands.Add(new SettingsCommand(
"Dropbox Settings",
"Dropbox Settings",
_ => { new DropboxSettings().Show(); }));
};
#endif
base.OnWindowCreated(args);
}
开发者ID:islamRaafat,项目名称:dropbox-sdk-dotnet,代码行数:17,代码来源:App.xaml.cs
示例18: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequest;
}
开发者ID:HaavardM,项目名称:havissIoT-WindowsApp,代码行数:4,代码来源:App.xaml.cs
示例19: OnWindowCreated
/// <summary>
/// Invoked when the application window is created.
/// </summary>
/// <param name="args">Details about the window creation.</param>
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
base.OnWindowCreated(args);
// handle search request when app is active
var searchPane = SearchPane.GetForCurrentView();
searchPane.PlaceholderText = "Enter a city or point of interest";
searchPane.QuerySubmitted += (s, e) =>
{
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame != null)
{
rootFrame.Navigate(typeof(LocationSearchResultsPage), e.QueryText);
Window.Current.Content = rootFrame;
// Ensure the current window is active
Window.Current.Activate();
}
};
searchPane.SuggestionsRequested += (s, e) =>
{
foreach (var option in APIMASH_TomTom.TomTomApi.SearchSuggestionList)
{
// search both the start of the string and after the comma where the state name starts
var alternateSearch = option.Label.Substring(Math.Max(0, option.Label.IndexOf(", ") + 2));
if (option.Label.StartsWith(e.QueryText, StringComparison.CurrentCultureIgnoreCase) ||
alternateSearch.StartsWith(e.QueryText, StringComparison.CurrentCultureIgnoreCase))
e.Request.SearchSuggestionCollection.AppendResultSuggestion(option.Label, String.Empty, option.Id,
RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/cameraSearch.png")), String.Empty);
// there's a max of five options in the list
if (e.Request.SearchSuggestionCollection.Size >= 5)
break;
}
};
searchPane.ResultSuggestionChosen += (s, e) =>
{
var selectedLocation = APIMASH_TomTom.TomTomApi.SearchSuggestionList.Where(x => x.Id == e.Tag).FirstOrDefault();
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame != null)
{
rootFrame.Navigate(typeof(MainPage),
new APIMASH.Mapping.LatLong(selectedLocation.Position.Latitude, selectedLocation.Position.Longitude).ToString());
Window.Current.Content = rootFrame;
Window.Current.Activate();
}
};
var settingsPane = SettingsPane.GetForCurrentView();
settingsPane.CommandsRequested += (s, e) =>
{
e.Request.ApplicationCommands.Add(
new SettingsCommand("About", "About",
(x) => ShowFlyout("About", new WebViewFlyout("/Flyouts/About.htm")))
);
e.Request.ApplicationCommands.Add(
new SettingsCommand("Support", "Support",
(x) => ShowFlyout("Support", new WebViewFlyout("/Flyouts/Support.htm")))
);
e.Request.ApplicationCommands.Add(
new SettingsCommand("Privacy", "Privacy",
(x) => ShowFlyout("Privacy", new WebViewFlyout("/Flyouts/Privacy.htm")))
);
};
}
开发者ID:jorik041,项目名称:TrafficCams-1,代码行数:74,代码来源:App.xaml.cs
示例20: OnWindowCreated
protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
SettingsPane.GetForCurrentView().CommandsRequested += (s, e) =>
{
SettingsCommand command = new SettingsCommand("settings", "Settings", (handler) =>
{
MainSettingsFlyout sf = new MainSettingsFlyout();
sf.Show();
});
e.Request.ApplicationCommands.Add(command);
};
base.OnWindowCreated(args);
}
开发者ID:visual14ph,项目名称:f1livetiming,代码行数:15,代码来源:App.xaml.cs
注:本文中的WindowCreatedEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论