windows-8

RightTapped not fired on Metro ListViewItem if ListView in other than “None” selection mode

▼魔方 西西 提交于 2019-12-04 12:53:49
The issue is practically the same as described here: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/542b827a-7c8e-4984-9158-9d8479b2d5b1 but I am not satisfied with the answer accepted there and feel that there must be a better solution... I am trying to implement a 'clasic' context menu on my list view (not via the AppBar but via PopupMenu) and that works fine, however only if I set the list view into the "None" SelectionMode. The link above correctly explains that the ListViewItem 'swallows' the right tapped event if ListView set to other than "None" selection mode.

Wi-Fi Direct doesn't connect devices on WinRT

喜你入骨 提交于 2019-12-04 12:50:06
I'm trying to connect two devices by Wi-Fi Direct but these are not connected. I tested both in my application and in Proximity Sample , the same error occurs: "Error this operation returned because the timeout period expired. (Exception from HRESULT: 0x80070584)" - Beside whom requested the connection "A device attached to the system is not Functioning. (Exception from HRESULT: 0x8007001F)" - the side of whoever accepts the connection. This happens during the call: StreamSocket socket = await PeerFinder.ConnectAsync(peer); Sometimes the devices are connected, but in most cases doesn't connect

XAML grouped GridView/Semantic Zoom not displaying all children?

♀尐吖头ヾ 提交于 2019-12-04 12:37:59
I'm attempting to use the XAML C# Grouped GridView sample to make my SemanticZoom work in a XAML C# Windows 8 app. The problem is, for some reason it's displaying the correct header (the category, in this case), but it's not showing all the items under the header (it's only showing one for each, when I have up to 6 items in some of them). Here's the SemanticZoom's XAML code (note that I left out the ZoomedOutView for brevity, and since it's working perfectly): <SemanticZoom x:Name="boardZoom" Height="626" Margin="10,132,10,0" VerticalAlignment="Top"> <SemanticZoom.ZoomedInView> <GridView

List<> .ForEach not found [duplicate]

☆樱花仙子☆ 提交于 2019-12-04 12:32:10
This question already has answers here : Is the List<T>.ForEach() method gone? (3 answers) Closed 6 years ago . I am porting a Windows Phone app to Win 8, and I have found this stumbling block, but cant find the solution. I have a: List<items> tempItems = new List<items>(); and ObservableCollection<items> chemists = new ObservableCollection<items>(); I have added items to my tempItems etc, so then I do this: tempItems.OrderBy(i => i.Distance) .Take(20) .ToList() .ForEach(z => chemists.Add(z)); But I get this error: Error 1 'System.Collections.Generic.List<MyApp.items>' does not contain a

WinRT - Loading data while keeping the UI responsive

这一生的挚爱 提交于 2019-12-04 12:19:49
问题 I'm developing a Windows Metro app, and am getting an issue with the UI becoming unresponsive. As far as I can tell, the cause is as follows: <ListView ... SelectionChanged="ItemListView_SelectionChanged" ... This event is handled here: async void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.UsingLogicalPageNavigation()) this.InvalidateVisualState(); MyDataItem dataItem = e.AddedItems[0] as MyDataItem; await LoadMyPage(dataItem); } private async Task

InjectTouchInput Windows 8 C# not working (returns false)

喜你入骨 提交于 2019-12-04 12:04:31
I've just recently started playing with the InjectTouchInput for Windows 8 Consumer Preview. I've gone round and round in circles trying to get the darn thing to work but just can't seem to get it to actually interact. I'm working in c# and at the moment am only creating a metro interface with x and y coordinates in two text boxes and buttons which call the functions below to touch on the screen at those coordinates. Is this the right way to go about doing this? protected unsafe class TouchDriver { public struct POINTER_TOUCH_INFO { public POINTER_INFO pointerInfo; // An embedded POINTER_INFO

Decompiled .winmd file contains nothing but external calls

六眼飞鱼酱① 提交于 2019-12-04 11:56:22
问题 I am trying to decompile the ComboBox control for my Windows Store app into C#, but there's no code. Instead, all the properties are calls to a separate assembly, it seems. How do I find where the real code exists, and how do I read the method bodies in C#? I cannot read assembly, so that would do me no good 回答1: Some notes on how to reverse-engineer the WinRT internals. Under the hood, WinRT is pure COM. First place you want to look on your machine is C:\Program Files (x86)\Windows Kits\8.0

GetFilesAsync stops working

我是研究僧i 提交于 2019-12-04 11:47:19
I've this piece of code public static class Storage { public async static Task<bool> Exists(string filename) { var folder = await Package.Current.InstalledLocation.GetFolderAsync("Assets"); var _files= await folder.GetFilesAsync(CommonFileQuery.OrderByName).AsTask().ConfigureAwait(false); var file = _files.FirstOrDefault(x => x.Name == filename); return file != null; } } and calling it from my Windows 8 Store application; this.IconExists = this.Game != null && Storage.Exists(this.IconName).Result; So if I put a break point on the above line and run it step by step, it works, but without

Possible to use Toast Notifications from a regular .Net application?

可紊 提交于 2019-12-04 11:45:43
I've recently been checking out the samples for WinRT(C#) for Windows Store. One really cool thing I saw was the Toast Notifications. I can think of a million different uses for them, but not a single one that would also be suitable as a windows store application. So, is it possible to use Toast Notifications in Windows 8 from regular .Net desktop applications? Yes you can. Look here for more information. 来源: https://stackoverflow.com/questions/12431523/possible-to-use-toast-notifications-from-a-regular-net-application

Setting mailto: protocol handler programmatically in Windows 8

一世执手 提交于 2019-12-04 11:43:52
Before Windows 8, the method of adding a mailto: protocol handler was straightforward (as outlined here Register Windows program with the mailto protocol programmatically ) As of Windows 8, the old method no longer works. It would seem that Win8 enforces the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\URLAssociations\‌​MAILTO\UserChoice . It also appears the ProgID of the selected app is hashed and can't be forged, at least not that I can tell. Does anyone have a working method for this, or can point me at a utility class/code that'll outline how to