microsoft-metro

Communication between Windows Store app and native desktop application

核能气质少年 提交于 2019-12-29 17:37:10
问题 ! For the sake of simplifying things I will refer to Windows Store applications (also known as Metro or Modern UI) as "app" and to common desktop applications as "application" ! I believe this is still one of the most unclear yet important questions concerning app-development for developers who already have established applications on the market: How to manage communication between apps and applications on a Windows 8 system? (please let's not start a debate on principles - there're so many

Determine when a Windows 8 app is launched by Notification

流过昼夜 提交于 2019-12-29 07:53:20
问题 I have notifications going to my application, I want to be able to take the user to that page in my application when they click on the notification or live tile (current displayed item). Is there a way to determine what the tile data is when your app is launched from a Live Tile or Toast Notification? Also, users have the ability to right click on a live tile and turn it off. Is there a way to detect that so I can turn off sending them live tiles or does WNS handle that? Thanks! 回答1: Windows

Determine when a Windows 8 app is launched by Notification

穿精又带淫゛_ 提交于 2019-12-29 07:53:12
问题 I have notifications going to my application, I want to be able to take the user to that page in my application when they click on the notification or live tile (current displayed item). Is there a way to determine what the tile data is when your app is launched from a Live Tile or Toast Notification? Also, users have the ability to right click on a live tile and turn it off. Is there a way to detect that so I can turn off sending them live tiles or does WNS handle that? Thanks! 回答1: Windows

Do Windows 8 Store apps have a MessageBox equivalent?

∥☆過路亽.° 提交于 2019-12-29 07:35:07
问题 Do Windows 8 Store apps have something like a MessageBox? I need something like a popup window to show the user e.g. when a input is wrong or a error happened. Is there something already in the API or do I have to make my own? 回答1: You're looking for the MessageDialog class 回答2: Modern UI guidelines sugest inline error messages for input. However, if you still want a MessageBox, you can have it in the MessageDialog. MessageDialog dlg = new MessageDialog("Message"); await dlg.ShowAsync(); 回答3:

Control Styles and Templates for Windows 8 Metro-UI

a 夏天 提交于 2019-12-29 07:11:32
问题 I've met some issue with the visual appearance of my C#/XAML Metro-UI application. I want to customize default template. For another type of applications, I can take default styles and controls from MSDN articles. For example: Control Styles and Templates for WPF Control Styles and Templates for Silverlight Where can I find something similar for Metro-UI default styles and templates? I know that is possible to extract template or style in Expression Blend. But I get the issue with my Blend

Difference between ListView and ListBox in Visual Studio

試著忘記壹切 提交于 2019-12-29 05:45:48
问题 What is the difference between "ListView" and "ListBox" in a "Windows 8" app. 回答1: The ListBox is an older control primarily for compatibility with other xaml frameworks. The ListView has build-in functionality for touch etc. Use the ListView unless you have a specific need for the ListBox See here for more detail. Specific events available only for ListView : DragItemsStarting ItemClick Methods: CompleteViewChange CompeteViewChangeFrom CompleteViewChangeTo InitializeViewChange

Unhandled exception handler not called for Metro / WinRT UI async void event handler

巧了我就是萌 提交于 2019-12-28 13:22:48
问题 Consider the following to be extracts from a Windows 8 Metro / WinRT app, which have been reduced to the bare minimum required to show the anomaly: public class App : Application { public App() { UnhandledException += (sender, e) => e.Handled = true; } } public class MainPage : Page { private void Button_Click_1(object sender, RoutedEventArgs e) { throw new NotSupportedException(); } private async void Button_Click_2(object sender, RoutedEventArgs e) { throw new NotSupportedException(); } }

Unhandled exception handler not called for Metro / WinRT UI async void event handler

主宰稳场 提交于 2019-12-28 13:22:15
问题 Consider the following to be extracts from a Windows 8 Metro / WinRT app, which have been reduced to the bare minimum required to show the anomaly: public class App : Application { public App() { UnhandledException += (sender, e) => e.Handled = true; } } public class MainPage : Page { private void Button_Click_1(object sender, RoutedEventArgs e) { throw new NotSupportedException(); } private async void Button_Click_2(object sender, RoutedEventArgs e) { throw new NotSupportedException(); } }

Converting a WebClient method to async / await

百般思念 提交于 2019-12-28 11:43:01
问题 I have some existing code which I am porting to Windows 8 WinRT. The code fetches data from URL, asynchronously invoking a passed delegate: private void RequestData(string uri, Action<string> action) { var client = new WebClient(); client.DownloadStringCompleted += (s,e) => action(e.Result); client.DownloadStringAsync(new Uri(uri)); } Converting to WinRT requires the use of HttpClient and asynchronous methods. I've read a few tutorials on async / await, but am a bit baffled. How can I change

Alternate background color in Listview XAML

我是研究僧i 提交于 2019-12-28 05:37:25
问题 I'm using a listView based on itemTemplate. So i need in my template to alternate the background color : - fist row: white - second row:gray - third row: white - forth: gray this is my template: <DataTemplate x:Key="ItemFlight" > <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="60"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Border Background="#28AADB" Margin="2"> <Image Source="{Binding Path=IsArrival, Converter={StaticResource BooleanToImageDisplayConverter}}" Width=