microsoft-metro

String.Intern() method missing in metro c#

淺唱寂寞╮ 提交于 2019-12-17 21:10:31
问题 How to get string intern method in Metro c#. if not found in windows 8 c#, is there any equivalent method to maintain system's reference to the specified String. 回答1: This is an inevitable side-effect of the language projection built into the CLR that enables the ".NET for Metro style apps" api. That projection maps a string that was obtained from a WinRT api call to System.String. The underlying string is not a managed string at all and doesn't live on the garbage collected heap. It is an

VS2012/ Blend 5: Debugging an Exception (only) occurring in design view

戏子无情 提交于 2019-12-17 19:05:55
问题 I'm developing a Metro-style app (for Windows 8) using C# and XAML. I have set up my viewmodels to be used as design-time datacontexts, like so: xmlns:vm="using:hub.ViewModels" d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=vm:ViewModels My app appears to work perfectly when run, but in the design views of both VS 2012 and Blend, I occasionally get this (unhelpful) error message: An Exception was thrown. TargetException: Error in the application. Stacktrace at System

Can I use Entity Framework or Linq To SQL with Windows 8 Metro Style apps?

我的未来我决定 提交于 2019-12-17 18:36:44
问题 I'm looking for some kind of ORM that can be used with Metro Style apps. I found lots of posts referring to different SQLite implementations that seem to be working (or not, according to other posts) with Metro style apps, but no working sample projects so far showing an ORM on Windows 8 Metro. Other posts are referring to projects that might work, but not pass the Marketplace certification because of forbidden API calls. Lots of the information I found is probably outdated, so I'm not sure

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.

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 check if file exists in a Windows Store App?

十年热恋 提交于 2019-12-17 07:28:49
问题 Is there any other way of checking whether a file exists in a Windows Store app? try { var file = await ApplicationData.Current.LocalFolder.GetFileAsync("Test.xml"); //no exception means file exists } catch (FileNotFoundException ex) { //find out through exception } 回答1: According to the accepted answer in this post, there is no other way at the moment. However, the File IO team is considering changing the the api so that it returns null instead of throwing an exception. Quote from the linked

Using jQuery with Windows 8 Metro JavaScript App causes security error

风格不统一 提交于 2019-12-17 07:08:14
问题 Since it sounded like jQuery was an option for Metro JavaScript apps, I was starting to look forward to Windows 8 dev. I installed Visual Studio 2012 Express RC and started a new project (both empty and grid templates have the same problem). I made a local copy of jQuery 1.7.2 and added it as a script reference. <!-- SomeTestApp references --> <link href="/css/default.css" rel="stylesheet" /> <script src="/js/jquery-1.7.2.js"></script> <script src="/js/default.js"></script> Unfortunately, as

Timer in Portable Library

[亡魂溺海] 提交于 2019-12-17 06:35:19
问题 I can't find a timer in portable library / Windows Store. (Targeting .net 4.5 and Windows Store aka Metro) Does any have an idea on how to created some kind of timing event? I need somekind of a stopwatch, so this should refreshn once a second or so 回答1: Update: We have fixed this in Visual Studio 2013. Portable libraries targeting Store (Windows 8.1) and .NET Framework 4.5.1 projects can now reference Timer. This is unfortunate case of where our implementation details are leaking to the user

Windows 8 Metro style ListView auto scroll

依然范特西╮ 提交于 2019-12-14 04:26:11
问题 I am using a ListView in a Windows 8 Metro style app and I want to programatically make it scroll to a point where a particular item is in the view. Is this possible? 回答1: Not sure if you're working with JavaScript or XAML, but in JavaScript you should be able to just set the ensureVisible(index) property of the ListView. This will make sure that item is visible, scrolling the ListView if necessary: http://msdn.microsoft.com/en-us/library/windows/apps/br211820.aspx In XAML, the ScrollIntoView

CollectionViewSource in windows metro app

不想你离开。 提交于 2019-12-14 03:46:13
问题 I have a collection, for which i require 3 different views 1. All data of collection 2. Grouped data (grouping criteria will be modified during application lifecycle ) 3. Filtered data (filter criteria will be modified during application lifecycle) What i want is that all views should bind to same collection so that any change to collection should be synced to all the views. With WPF, this can be achieved using CollectionViewSource. In Modern UI apps, CollectionViewSource still exists, but