windows-8

How to disable Suspending || Closing || Terminating event for my Metro Style App on Windows 8 Pro

雨燕双飞 提交于 2019-12-17 17:11:50
问题 I'm a french developer and I need to develop an Metro Style app for Windows 8 Pro who is always launched. I wanted to know how can I disable the close event of my app. My app need to be in front all the time and the user couldn't quit the app. I thought I could disable all the shortcut with the GPO but the close gesture (drag the app from the top to the bottom) need to me disabled too. I hope I was clear and everybody will understand the question :-). Feel free to ask me more specific

What's the equivalent of the System.Diagnostic.Process on WinRT (C#)?

点点圈 提交于 2019-12-17 17:04:07
问题 I need to launch a couple of commands from my WinRT application, like if it were a Command Console, in order to do this, on not WinRT apps the class to be used is System.Diagnostic.Process but on Win RT his class is not available, is there any equivalent class or method that i could use? Thanks in advance :) 回答1: You cannot do that from a Windows Store application - those are sandboxed and do not have access to other processes. More details here. 回答2: Windows Store Apps cannot launch other

How can we check if the current OS is win8 or blue

蓝咒 提交于 2019-12-17 16:44:18
问题 Win8.1 and Win8 has the same OS Version. How can we check if the current OS is Win8 or Blue? The Environment.OSVersion is giving us the same results: Environment.OSVersion 6.2.9200.0 Environment.OSVersion.Version 6.2.9200.0 Environment.OSVersion.Version.Major 6 Environment.OSVersion.Version.Minor 2 回答1: Windows 8.1 will lie to you and tell you it is Window 8. Changing that lie requires editing the manifest that is embedded in your program so that Windows knows you don't want to be lied to.

How to get clicked item in ListView

一个人想着一个人 提交于 2019-12-17 16:39:15
问题 This should be a trivial Task but I can't find how to do it. I want to listen to a click on an item in a listview, get the corresponding model object, and launch a new screen. This is the XAML for the ListView: <ListView x:Name="ItemListView" ItemTemplate="{StaticResource StoreFrontTileTemplate}" ItemContainerStyle="{StaticResource StoreFrontLVTileStyle}" Margin="0" VerticalAlignment="Top" ItemClick="MyClick" Tapped="MyTap"/> And MyClick, MyTap: private void MyClick(object sender,

Get OS-Version in WinRT Metro App C#

安稳与你 提交于 2019-12-17 16:35:13
问题 I'm programming a Metro Style App with C# and the Visual Studio 11 Beta. Now I want to get the OS-Version of the OS. How can I get this? I found out how to do it in "normal" Applications. There you take the Environment-Class with the attribute OSVersion but in .NET Core there isn't this attribute 回答1: For new applications you should check for specific features, not OS version. As far as I can tell there is no reason to check for OS version as metro applications are only available for win 8.

Could I know if my app is running on Windows RT with C#?

北城以北 提交于 2019-12-17 16:33:03
问题 I know that there is no way to get OS version in Windows Store app, please let me explain more. My app is a Windows Store app programming with C#. Some features of my app is depend on another desktop app (maybe it's not a good design). As I know, a third-party desktop app can not install on Windows RT, so I just want to know if my app is running on Windows RT and forbid some features of my app on Windows RT. I don't want to use GetNativeSystemInfo(), because it's a win32 API, and if I use

Is there a possibility to start another App or Program from a Windows 8 Store App (C#)

旧城冷巷雨未停 提交于 2019-12-17 14:56:18
问题 I want to start another App or Program from my Windows Store App. For example my App is showing emails, so if someone clicks on such an email Outlook should open. Is this possible in an "App-Sandbox"? 回答1: It is not possible to just launch an arbitrary application, but with custom protocol activation you can launch an app that handles that protocol and if it is not installed - the OS will ask the user to install it. It means that if you can define a custom protocol in your app - you can

Detect Metro UI Version of IE

时光怂恿深爱的人放手 提交于 2019-12-17 10:37:23
问题 What's the fastest method, to detect User-Agent as metro UI version of internet-explorer >=10 ? 回答1: So, there doesn't appear to be a definitive test to identify Metro IE vs Desktop IE, but there does seem to be a few different pieces of data you can attempt to use to assume that it is Metro. Unfortunately, none of the items I have found can't be explained away by other settings. In other words, for all the "feature" tests I have found, Desktop IE could be configured in a way to trick the

how to calculate the textbock height and width in on load if i create textblock from code?

∥☆過路亽.° 提交于 2019-12-17 09:53:44
问题 TextBlock tbl= new TextBlock(); tbl.text="Kishore"; double x=tbl.ActualHeight; double y=tbl.ActualWidth; If i execute the code from the loaded event in Metro - winRT will return 0 for both. How can I get the ActualWidth in the Loaded or SizeChanged event? 回答1: Call Measure() then Arrange() and then ActualWidth and ActualHeight will be updated. 回答2: Can also do this via UpdateLayout(); testBlock.ActualWidth This could be useful when calculating multiple objects heights and widths. 回答3:

The given System.Uri cannot be converted into a Windows.Foundation.Uri

喜欢而已 提交于 2019-12-17 09:35:56
问题 I'm trying to programmatically load a BitmapImage in a XAML Metro app. Here's my code: var uri = new Uri("/Images/800x600/BackgroundTile.bmp", UriKind.RelativeOrAbsolute); var imageSource = new BitmapImage(uri); The second line crashes with a System.ArgumentException: The given System.Uri cannot be converted into a Windows.Foundation.Uri. Please see http://go.microsoft.com/fwlink/?LinkID=215849 for details. The link just goes to the MSDN home page, so it's no use. I've also tried removing the