windows-store-apps

LIVE SDK v5.3 & Window 8 - How to tell the difference between a user logged in with a Microsoft Account and user with a local account?

空扰寡人 提交于 2019-12-24 09:15:08
问题 I'm using the v5.3 Live SDK for a Windows 8 Store App (XAML/C#) and I have a question. In my app, if the user is logged into Windows using a Microsoft Account, then I want to grab the firstname/lastname/Microsoft ID. If they are logged in to Windows using a local account and haven't logged in to my app, then I want to show a 'Login' button, so they can enter their Microsoft account email/password. I know how to do all that using the Live SDK, but my question is - how can I tell if the user is

UWP: Cannot access LicenseInformation

懵懂的女人 提交于 2019-12-24 08:26:14
问题 I am using the following piece of code to check in my UWP-JS app if an in-app purchase is active: (function () { // Initialization // var store_app = Windows.ApplicationModel.Store.CurrentApp; var store_app = Windows.ApplicationModel.Store.CurrentAppSimulator; var licenseInformation = store_app.licenseInformation; // Check for Product if (licenseInformation.productLicenses["product1"].isActive) { // do something } else {}; })(); when I debug this I get the following error for line 5:

Cannot retrieve file from FutureAccessList if I use getFileAsync instead of Picker.pickSingleFileAsync

我是研究僧i 提交于 2019-12-24 08:23:05
问题 I have an app that retrieves files in two ways: one using a file picker and the other, using the path directly. In both cases, I get the file, add it to the future access list, and save the token in an array. Later in the app, I use the token to retrieve the file using futureAccessList.getFileAsync . Now, the 2nd half, i.e. getting back of the file using the token code is identical in both cases, so it must be something in the way I add it to the future access list, because it works when I

Windows 8 store app development without touch screen

穿精又带淫゛_ 提交于 2019-12-24 07:12:13
问题 I've started doing Windows 8 Store app development for some projects at work, but I do not have a touch screen device of my own at home. If I write a personal app for submission to the store, I must use my own hardware since I can't use the work computers for personal projects. My concern is getting into a situation where I submit an app to the store, then have touch-screen users describing issues that I can't replicate on a non-touch-screen device. Are there any functions or capabilities or

Setting Path.Data in code-behind

故事扮演 提交于 2019-12-24 05:33:14
问题 I have this XAML code which makes a Path which is inside a Canvas residing in a MainPage.xaml page. <Path x:Name="progressPath" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stroke="Gold" StrokeThickness="5" Canvas.Left="300" Canvas.Top="300" Height="305" Width="305" Data="m 150,0 A 150,0 0 0 0 150,0 A 150,150 0 0 0 150,0"> </Path> I want to have several Path 's like this one (for example, a new Path is made when the user taps a button), so I decided to create them in the

How to disable “scroll compression” in ScrollViewer

混江龙づ霸主 提交于 2019-12-24 05:30:13
问题 In a template I'm using a ScrollViewer with the following properties: <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" HorizontalSnapPointsType="MandatorySingle" HorizontalSnapPointsAlignment="Near" ZoomMode="Disabled"> <ItemsPresenter/> </ScrollViewer> This works mostly fine. The only detail I want to change is to disable "scroll compression" when the scroll viewer is scrolled to either the leftmost/rightmost positions. At these positions, if I

WPF nested ListView ItemsSource

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:28:02
问题 I have a following data model: class Item{ public string Name{get;set;} public ObservableCollection<SubItem> SubItems {get;set;} } class SubItem{ public string Name {get;set;} } I have a ListView that shows an ObservableCollection fine as: <ListView x:Name="lvResult" Background="DeepPink" Grid.Row="1" ItemsSource="{Binding}"> <ListView.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding }" FontWeight="Bold"/> <ListView Background="Black" Margin="8,0,0

Windows Store App ListView: How to use the GroupStyle?

人走茶凉 提交于 2019-12-24 03:06:01
问题 am porting a Windows Phone App to Windows Store and trying to create a grouped ListView. There is a good article in the Dev Center and grouping the list is no problem. But there are some things I do not understand about the GroupStyle. The example from the article uses a GroupStyleSelector that leads to the following GroupStyle: <GroupStyle x:Key="listViewGroupStyle"> <GroupStyle.HeaderTemplate> <DataTemplate> <Grid Background="LightGray" > <TextBlock Text='{Binding Key}' Foreground="Black"

Best practice to avoid multiple disposals with the `using` keyword in C#

拈花ヽ惹草 提交于 2019-12-24 03:05:11
问题 When a variable is IDisposable, we have the using keyword to manage the disposal. But what if we return the value in a method, should we have using twice? StringContent stringToStringContent(string str) { using (StringContent content = new StringContent(str)) { return content; } } void logStringContent() { using (StringContent content = stringToStringContent("test")) { Debug.WriteLine(content.ToString()); return; } } In this example above, I only have 1 new but I have 2 using for the same

Windows Store App ListView: How to use the GroupStyle?

北慕城南 提交于 2019-12-24 03:05:03
问题 am porting a Windows Phone App to Windows Store and trying to create a grouped ListView. There is a good article in the Dev Center and grouping the list is no problem. But there are some things I do not understand about the GroupStyle. The example from the article uses a GroupStyleSelector that leads to the following GroupStyle: <GroupStyle x:Key="listViewGroupStyle"> <GroupStyle.HeaderTemplate> <DataTemplate> <Grid Background="LightGray" > <TextBlock Text='{Binding Key}' Foreground="Black"