microsoft-metro

Metro app: change GridView.ItemTemplate programmatically

[亡魂溺海] 提交于 2019-12-23 02:38:14
问题 I've a GridView in my Xaml with a given DataTemplate set a StaticResource: <GridView x:Name="itemGridView" ItemsSource="{Binding Source={StaticResource itemsViewSource}}" ItemTemplate="{StaticResource MyItemTemplate }" SelectionMode="None" IsItemClickEnabled="True" ItemClick="ItemView_ItemClick"/> By clicking on a button in the AppBar, I'd like to restyle this template by applying another DataTemplate - MyItemTemplateWide to this particular list. My datatemplates are stored in an Xaml file

Rendering an image at runtime in WinRT

时间秒杀一切 提交于 2019-12-23 02:01:47
问题 I found that WriteableBitmap.Render() is not supported in WinRT. Is there any other API for drawing bitmap images in Metro? I need to render some xaml-primitives (Rectangles, Circles, Paths, etc.) to png-image. 回答1: It is indeed not supported yet. Your best bets are to either use WriteableBitmapEx or Direct2D. 来源: https://stackoverflow.com/questions/11840835/rendering-an-image-at-runtime-in-winrt

How to center Popup in Metro style app in c#

耗尽温柔 提交于 2019-12-22 18:48:18
问题 Is there any way to show a Popup in Windows 8 Metro centered? Setting VerticalAlignment and HorizontalAlignment to "Center", and VerticsalOffset and HorizontalOffset to 0 causes howing popup with left-up corner in the center of the screen. Is there any way to do it nicely? To make this problem harder, this popup has different size in snapped view, where is also should be centered. Any thoughts? 回答1: Hope this helps, how about placing the popup in a canvas then manipulate the canvas... XAML

Metro IndexedDB, browsing the database

六眼飞鱼酱① 提交于 2019-12-22 17:41:18
问题 I am trying to store data in a "Metro" App for Windows 8 using IndexedDB. I would like to be able to browse the database (to monitor that my operations modify the data as intended). So my question is; Is there any way of viewing the actual database of a metro app (IE10)? (something like in Chrome Dev Tools (Resources > IndexedDB)) Regards 回答1: Not that I know, but my linq2indexeddb library has a viewer in it. That way you can inspect the content of you database while debugging. The nuget

AuthenticationToken is null

天涯浪子 提交于 2019-12-22 11:23:17
问题 I'm currently writing a C# metro app for the Windows 8 consumer preview which fetches some data from my REST-based web services. I want the app to authenticate against the services using the Windows Live account of the current user. Therefore, I added the Windows Live SDK to my solution and pasted the following snippet from the documentation into my login view: LiveAuthClient liveClient = new LiveAuthClient(); LiveLoginResult loginResult = await liveClient.Login(new string[] { "wl.signin" });

Is it possible to set a subject to the mail app in Windows 8 metro application, if I am using share contract and sharing files?

风流意气都作罢 提交于 2019-12-22 06:11:36
问题 First of all, I am sharing the content from my windows 8 metro application to another app (for example Mailto app) so: Now I am sharing files to mailto app using share contract and sharing files from my application, I wanted to know if: - Can I set the subject to the mailto app to which I am sharing files as an attachement to that mailto app, if so please let me know how can I do this? If not, please let me know what is the work around? 回答1: As of now, it's not possible. Windows 8 recently

Is it possible to set a subject to the mail app in Windows 8 metro application, if I am using share contract and sharing files?

半城伤御伤魂 提交于 2019-12-22 06:11:16
问题 First of all, I am sharing the content from my windows 8 metro application to another app (for example Mailto app) so: Now I am sharing files to mailto app using share contract and sharing files from my application, I wanted to know if: - Can I set the subject to the mailto app to which I am sharing files as an attachement to that mailto app, if so please let me know how can I do this? If not, please let me know what is the work around? 回答1: As of now, it's not possible. Windows 8 recently

Get Albumart in .mp3 file for Windows Store App

有些话、适合烂在心里 提交于 2019-12-22 05:43:08
问题 How can i get the AlbumArt image in the mp3 file? I am developing Windows Store app with c#. MusicProperties class gives me Album name artist name vs. But it cant give me albumart. 回答1: Check out MSDN sample to show thumbnail of any file. It also consists how to retrieve the album art. File and folder thumbnail sample If you want to save the album art check out How to store save Thumbnail image in device in windows 8 metro apps c# UPDATE 1 MediaFile is StorageFile . ImageControl is <Image ...

SOAP Service Reference in Windows Phone 8.1 Universal app

霸气de小男生 提交于 2019-12-22 04:42:47
问题 I try to add a reference to a SOAP WebService. No problem adding it to the Windows 8.1 part of the project. But no chance to do the same for the WP 8.1. Somehow I could only add a new "Push Notification" as a reference. Adding the generated reference.cs to the WP project directly leads to many unresolved references in System.ServiceModel (i.e. System.ServiceModel.Channels not found). Any idea? Maybe its not in the current beta? VS 2013 Update 2 RC. 回答1: While not a proper solution, a

WinRT - How to ignore or delete page from navigation history

自作多情 提交于 2019-12-22 04:34:34
问题 I have following situation in my WinRT metro (c# - xaml) application : User launch the application and he or she is not logged in. In the menu bar I have button which navigates them to Shopping cart. It's important to mention that they can click on it regardless of logged in/out status. So I have this : Home Page - > Login Page - > Shopping Cart And everything works great, but when I try press BACK button on my Shopping Cart page I'm navigated back to Login Page, which make sense, because