windows-8

Bring up desktop app from Start(or metro) screen in Windows 8 programatically

£可爱£侵袭症+ 提交于 2019-12-08 13:06:13
问题 I am writing a LOB WPF program which gives some text alert (just simple MessageBox.Show(); ) to user. But as you imagine, the desktop app that I wrote does NOT be displayed to user unless the user switches to Desktop mode by clicking "Desktop" tile. I tried to use InputSimulator in order to press Win+D virtually, but exception was thrown. How can I bring up desktop app to foreground programatically? 回答1: If I'm understanding the question correctly, you aren't writing an additional Windows

JSON.NET Line serialization winrt

守給你的承諾、 提交于 2019-12-08 13:04:27
问题 I'm having some trouble with serializing a ObservableCollection of Lines (Shape). I'm developing for Windows RT and I'm using JSON.NET v5.02. I'm getting the following exception for the code below: ObservableCollection<Line> lines; //some code string linesString = JsonConvert.SerializeObjectAsync(lines); // problem An exception of type Newtonsoft.Json.JsonSerializationException occurred in mscorlib.dll but was not handled in user code Additional information: Error getting value from 'X1' on

PDFkit js how to save document to file (Win 8 app)

耗尽温柔 提交于 2019-12-08 12:50:22
问题 I am working on a Windows 8 Javascript application that generates a PDF using PDFKit. Normally you'd make a blobstream using pipe and then make an URL of it that you send to the browser. This only works if the website is run from a server, which is not the case since it's a local app. However I do have access to the file system and I'd like to save the generated PDF to a file. To do this I was inspired by this question: How to pipe a stream using pdfkit with node js I tried both above's

Register custom protocol handler on Win8 in Delphi 7/2006 app

强颜欢笑 提交于 2019-12-08 12:37:09
问题 We need to register our app as the default protocol handler for a custom protocol dialphone:// (and sometimes for one of the default protocols). Our code to do this broke on Win8 (how and why of breakage described by MS) It is unclear to us: How to solve this What to do in code This article in the Default Programs UI section seems to say we have to use IApplicationAssociationRegistrationUI But it is not clear: How to get our app on the list of apps Is there any way to do this silently (so the

adding a progress bar when navigating from page to another in windws 8 apps using xaml

假如想象 提交于 2019-12-08 12:15:37
问题 I am developing a windows 8 application and I want to add a progress bar to my pages when navigating from one to another since users will have to wait in order for the data to be loaded from the server. Can anyone provide me with the code that I need to add in XAML and C#? What property or event of the progress bar should be used? //XAML PAGE <common:LayoutAwarePage x:Name="Hub1" x:Class="App1.GroupedItemsPage1" DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"

Windows 8 Javascript app activation/launch deferral

情到浓时终转凉″ 提交于 2019-12-08 12:09:54
问题 So currently in a windows 8 WinJS app I'm coding, I am trying to get the loading of an xml file to take place in the app startup sequence, while the splash screen is still showing, as this xmldoc element is needed for when the home page loads, and loading of the home page will fail without it. This is my initiation sequence in default.js: (function () { "use strict"; var activation = Windows.ApplicationModel.Activation; var app = WinJS.Application; var nav = WinJS.Navigation; var sched =

Launching the Windows Store listing from Win RT / Windows 8 app

◇◆丶佛笑我妖孽 提交于 2019-12-08 11:16:34
On Windows Phone there's a marketplace review task. Is there any way to implement the equivalent functionality in WinRT apps? I realize that there's the "rate and review" button in the Charms bar, however, this is not what I need, as I want to integrate a button inside the app to launch the review UI. It may seem trivial, however, this is one of the most important requirements! This is not a duplicate of is there an equivalent of wp7's marketplacereviewtask for windows 8 / winrt / metro style? because the questioner was happy with the Charms bar method. thanks This can be done in C# this way:

WinRT - Multiple WebViews inside ScrollViewer

前提是你 提交于 2019-12-08 10:02:23
问题 I have a ScrollViewer and WebViews inside. <ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="Disabled" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Hidden"> <StackPanel Orientation="Vertical"> <WebView/> <WebView/> <WebView/> ... <WebView/> </StackPanel> </ScrollViewer> All of WebView's have height equals to its content (I implemented something like WrapContent for webView). Now, the thing is, that the webviews are bouncing (rubber-band effect) while scrolling and

how to set a focus of Listview item in Metro apps?

北城以北 提交于 2019-12-08 09:56:56
问题 I have a listview in my metro-app.I want to set a focus of last-item in my listview?How can I set a focus of a listview-item?Can anyone help me? Thank you. 回答1: You need to use the ListViews currentItem property: http://msdn.microsoft.com/en-us/library/windows/apps/hh700672.aspx Specifically, assign it an object with the index of the data item you want selected (from your data source), and the hasFocus and showFocus properties set: var yourListView = getYourListViewFromSomewhere();

How to give “Everyone” write permissions via C++ MFC on Windows 8?

让人想犯罪 __ 提交于 2019-12-08 09:39:22
问题 Im struggling with changing permissions. I need, on Windows 8, to change the permissions of a file to have group "Everyone" write permissions. How to I do that? Im trying to edit a file with C++ MFC which already exists with no "Write" (Everyone) checked, thats causing me many problems. 回答1: Your Application need to have the rights to change the permissions for the file. #pragma comment(lib, "Advapi32.lib") #include "Aclapi.h" #include "Sddl.h" #include <io.h> #include <sys/stat.h> void