windows-store-apps

Metro Style App HTML/JS writing local files

别来无恙 提交于 2019-12-23 04:13:32
问题 I've built an app for Windows Store that writes to local files using Windows.Storage.FileIO (createFileAsync, readTextAsync and writeTextAsync). My plan is to use the file as a simple database (the data is simply JSON formatted user information). Is this a bad idea? Are the files written this way really persistent (or are they deleted when the app is updated)? Can the user themselves delete them (for example through deleting cookies/temp internet files or the likes)? I'm just wondering how

QR Code in Windows Store App

戏子无情 提交于 2019-12-23 03:38:12
问题 I need to program a QR code reader in my Windows RT app, so I can get the ID of the specific item I am scanning. I have found the source to a free QR code generator, but I cannot find the code to read the ID from the QR Code, so can anybody in here tell me, where I can find the source to a QR Reader or any other ways to read the QR Code e.g. Install a third-party program, which only reads the QR Code and sends the result back to my program 回答1: I would recommend taking a look at ZXing.NET. It

Timer in Windows 8.1 - how to mimic Timer(TimerCallback) constructor?

拜拜、爱过 提交于 2019-12-23 03:12:16
问题 I am porting an existing .NET class library that uses System.Threading.Timer to a Windows Store app that targets Windows 8.1. The Timer class is available, but a few options seem to be missing in relation to the corresponding .NET Framework Timer . In particular, there are only two constructors available in the Windows Store version: public Timer(TimerCallback callback, Object state, int dueTime, int period); public Timer(TimerCallback callback, Object state, TimeSpan dueTime, TimeSpan period

Resizing a control in Windows store app

若如初见. 提交于 2019-12-23 02:53:25
问题 Was just wondering how I would go about letting the user resize a TextBox control at runtime by dragging its corners in Windows Store App. Less importantly, is the same technique used for the resizing of all controls? Thank and regards! 回答1: Here I am giving you only for textbox as for others it's same. XAML Code <Page> <Canvas Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <Grid x:Name="grdTextbox" Canvas.Left="300" Canvas.Top="300" Height="40" Width="200"> <Thumb x:Name=

How to add scrolling/moving text in textblock in xaml

南笙酒味 提交于 2019-12-22 18:34:11
问题 I want to add a scrolling/moving text(from right to left) in the textblock. It should scroll one time only. I have Googled it but didn't find anything. I want to scroll the text in the textblock (not the whole textblock) only once. Then scrolling should be stopped. I found this code on net but it is not what I want. I want to scroll the text 1 time and then stop scrolling. Any idea how to do that? <TextBlock FontSize="22" x:Name="txtScrolling" Margin="1386,208,-616,460"> <TextBlock

Relative width for UI Elements with RelativePanel in XAML with UWP Apps

风格不统一 提交于 2019-12-22 18:19:14
问题 I want to realize something like |Image (40% Width)|Text(60% Width)| that adapts to small screens like |Image (100%)| |Text(100%| I've got the following solution with AdaptiveTrigger and an Grid. <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="VisualStateGroup"> <VisualState x:Name="NarrowView"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="0" /> </VisualState.StateTriggers> <VisualState

Exception: The application called an interface that was marshalled for a different thread

筅森魡賤 提交于 2019-12-22 18:17:41
问题 private void LogInButton_Click(object sender, RoutedEventArgs e) { var api = new RestAPI("http://localhost:2624/", UsernameTextBox.Text, PasswordTextBox.Password); api.AutenticarUsuarioFinalizado += (o, args) => { ProgressBar.IsIndeterminate = false; ProgressBar.Visibility = Visibility.Collapsed; LogInButton.IsEnabled = true; if (args.Error) return; if (args.Resultado.Autenticado) { } }; api.AutenticarUsuario(); ProgressBar.Visibility = Visibility.Visible; ProgressBar.IsIndeterminate = true;

Retrieving data from webview in Windows 8.1 Store HTML5 app

大兔子大兔子 提交于 2019-12-22 16:45:34
问题 I am developing a Windows Store HTML5/Javascript app. As part of my app I need to invoke a Javascript method on a web page and retrieve its return value. The control x-ms-webview has a method invokeScriptAsync that can invoke a script on a webview. However there is no way of retrieving a value back from any method call. It also does not seem to support the standard method of communication with a host app, window.external.notify . How can I retrieve a value from a web page in a Windows Store

Windows Store Application Session

时光总嘲笑我的痴心妄想 提交于 2019-12-22 12:39:13
问题 I am developing windows store application. I need to create sessions for the app in c#. how to do this in windows store applications? 回答1: The following article will best help you manage sessions Manage app lifecycle and state (Windows Store apps using C#/VB and XAML) Its is part 2 of a series. It might be worthwhile to go through the entire series 来源: https://stackoverflow.com/questions/16121039/windows-store-application-session

How to get the logged in user details(user email id and user name) using Access Token in AAD Single Sign on using java script back-end?

一个人想着一个人 提交于 2019-12-22 12:25:21
问题 Hi am developing a windows store 8.1 app using C# and xaml For log in, am authenticating the user with Windows Azure Active directory Single Sign-on using JavaScript back-end. Once the user is logged in and i have the access token, how to get the logged in user's user email id and Username using the access token in the app? Anybody please provide me a solution to get the user email using the access token? 回答1: If you have the access token then that should contain the user id value. For