windows-8

Creating hub page with different controls in Windows 8

南笙酒味 提交于 2019-12-06 05:25:10
问题 The most landing/hub pages you see are just a GroupedGridView ( for example the actual marketplace app ) But I would like to have a Grouped hub page with different controls. For example my first control is a ListView that contains some categories. 2nd and 3th control are GridViews with several items in them. If all 3 controls were GridViews I could easily get this working but it's not. I can't seem to find a working combination of ScrollViewer with a Grid or Stackpanel to get the actual full

How do I mix Light and Dark themes in a C#/XAML Windows Store (Metro UI) App?

十年热恋 提交于 2019-12-06 05:24:56
问题 According to MSDN, the standard way of setting your app theme is to set RequestedTheme="Dark" or RequestedTheme="Light" on the toplevel Application instance. This works great for simple apps but many times I find myself wanting to change the theme of an individual page or even an individual control (e.g. a light-themed text edit page vs a dark-themed image viewer in the same app). XAML controls have 10s or 100s of visual states and color definitions and setting each one of them by hand is

Catch an async lambda exception

瘦欲@ 提交于 2019-12-06 04:42:36
I am working on Windows 8 (using C#) and when using the async keyword there's a scenario where i can't seem to handle exceptions well. The scenario involves launching an async lambda, posting it to run on the UI thread. Exceptions that occur during the execution of the lambda code gets re-thrown on the calling thread, with no ability to catch them properly. Example: this block of code is executed on some worker thread, and tries to schedule work on the UI thread: await Window.Current.Dispatcher.RunAsync (CoreDispatcherPriority.Normal , async () => { var result = await CurrentAppSimulator

Getting List the blob in winRt application

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:29:45
I would like to list blobs in a container. For desktop apps, the Azure Storage SDK provides the following method: CloudBlobContainer container = blobClient.GetContainerReference("myBlob"); container.ListBlobs(); However, using the WinRT library the method is absent (probably due to its blocking nature). What should I use instead? You would need to use ListBlobsSegmentedAsync function on the blob container to fetch the list of blobs. See the code below for example: CloudStorageAccount account = new CloudStorageAccount(new StorageCredentials("accountname", "accountkey"), true); var client =

Page.OnNavigatedTo doesn't get called in Windows Store app

萝らか妹 提交于 2019-12-06 04:26:05
I have a Windows Store mess around app. I added a Basic Page and it added the Common classes, such as LayoutAwarePage. But Page.OnNavigatedTo doesn't get called when an app starts. The MSDN doc says: Invoked when the Page is loaded and becomes the current source of a parent Frame Which happens during launch. I discovered this when LoadState wasn't being called. Rick Barraza uses LoadState, which is called by OnNavigatedTo, in his demo: http://channel9.msdn.com/Series/Migrating-apps-from-Windows-Phone-to-Windows-8/Binding-the-Interface-in-Windows-Store-apps#time=2m50s I know something is broken

The application called an interface that was marshalled for a different thread in window 8

a 夏天 提交于 2019-12-06 04:23:18
问题 In project i use HttpWebRequest to to download Feeds : HttpWebRequest request; public void getFeeds() { request = (HttpWebRequest)WebRequest.Create("http://vnexpress.net/rss/gl/trang-chu.rss"); request.BeginGetResponse(ResponseCallBack, request); } SampleDataGroup group1; private void ResponseCallBack(IAsyncResult result) { var request = (HttpWebRequest)result.AsyncState; var response = request.EndGetResponse(result) as HttpWebResponse; if (response != null && response.StatusCode ==

How to store save Thumbnail image in device in windows 8 metro apps c#

泄露秘密 提交于 2019-12-06 04:21:40
问题 I am creating Thumbnail and showing in frame by using this code Platform -> windows 8 metro apps using c# http://code.msdn.microsoft.com/windowsapps/File-and-folder-thumbnail-1d530e5d in windows 8 metro apps using c#. i need to save or Store ( in device )the thumbnail image which i am creating at run time. in DisplayResult() of constants.cs class file i need to save that image in device how to achieve this . please give me some idea or example i am very new in mobile and never worked on Image

ISupportIncrementalLoading from bottom to top

老子叫甜甜 提交于 2019-12-06 04:20:14
问题 I have implemented ISupportIncrementalLoading in WinRT for incremental loading in a ListView , it works great. The problem is that the new items are added to bottom of list, to see more items, I need to go down. What I need is the opposite. I would like that to see more items, I would need to go scroll up. The list is basically a log file, the newest date must be displayed at bottom of the list, and if I want to see older records, I would need to use the scroll up. Is there a way to do it?

GetFilesAsync stops working

与世无争的帅哥 提交于 2019-12-06 04:16:12
问题 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)

InjectTouchInput Windows 8 C# not working (returns false)

佐手、 提交于 2019-12-06 04:07:44
问题 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