microsoft-metro

Metro Application How to Read XML API?

泪湿孤枕 提交于 2019-12-31 05:04:25
问题 Ok so I am trying to learn how to work with XAML and how to build new windows metro applications using Visual Studio 11 Developer Preview. I have a problem though I don't know how to read XML files the same way I use to using C#. For example here is how I did it in the past. private void Button_Click(object sender, RoutedEventArgs e) { string UrlString = "http://v1.sidebuy.com/api/get/73d296a50d3b824ca08a8b27168f3b85/?city=nashville&format=xml"; XmlTextReader reader = new XmlTextReader

Metro Application How to Read XML API?

柔情痞子 提交于 2019-12-31 05:04:07
问题 Ok so I am trying to learn how to work with XAML and how to build new windows metro applications using Visual Studio 11 Developer Preview. I have a problem though I don't know how to read XML files the same way I use to using C#. For example here is how I did it in the past. private void Button_Click(object sender, RoutedEventArgs e) { string UrlString = "http://v1.sidebuy.com/api/get/73d296a50d3b824ca08a8b27168f3b85/?city=nashville&format=xml"; XmlTextReader reader = new XmlTextReader

Add contact to users contaclist in aWindows 8 Metro App

风格不统一 提交于 2019-12-30 18:57:43
问题 I'm creating a Windows 8 Metro App with c# In the app you can search persons in a phonebook. Is there a possibility to add a found contact to the users contact-list? I know you can browse the contacts with the Windows.ApplicationModel.Contacts.Provider, but I can't see how you can add a contact. thanks for help 回答1: You can do so through the Contact Picker Contract. Use ContactPickerUI.AddContact. This will bring up a UI that the user can use to add the Contact you hand it. You cannot add a

Is it possible to attach two debugger to one process?

泄露秘密 提交于 2019-12-30 17:22:55
问题 Is it possible to attach two debugger to one process ? Recently, I had developed a Metro Style App in HTML5/CSS and that was calling a Window Runtime Component written in C#. What I wanted to do was attach two debugger to same process. One at JavaScript & another at C# code. The Step I followed: I opened two visual studio instances targeting same solution. I put a breakpoint in JavaScript code and f5/run the application via VS instance 1. But, when I tried to attach 2nd debugger in C# window

Is it possible to attach two debugger to one process?

被刻印的时光 ゝ 提交于 2019-12-30 17:22:14
问题 Is it possible to attach two debugger to one process ? Recently, I had developed a Metro Style App in HTML5/CSS and that was calling a Window Runtime Component written in C#. What I wanted to do was attach two debugger to same process. One at JavaScript & another at C# code. The Step I followed: I opened two visual studio instances targeting same solution. I put a breakpoint in JavaScript code and f5/run the application via VS instance 1. But, when I tried to attach 2nd debugger in C# window

Can't use create_async() with WRL WinRT component

依然范特西╮ 提交于 2019-12-30 12:15:28
问题 I want to write a WinRT component with async support using WRL, but I found create_async() is undefined even I included the ppltask.h and using namespace concurrency How to create a background task with WRL pattern? My function is like: HRESULT GetStreamAsync([out, retval] IAsyncOperation<IRRandomAccessStream*>** operation); I also try to use IThreadPoolStatics->RunAsync() , but seems it only can be used in case of IAsyncAction and without return value. Does anyone can help? 回答1: concurrency:

Windows 8 WrapPanel

不羁岁月 提交于 2019-12-30 08:17:24
问题 I've got problem with automatically breaking StackPanel into next line. Here's the sample code: <StackPanel Orientation="Horizontal" Width="180"> <TextBlock.../> <TextBlock.../> <TextBlock.../> <Image.../> ... </StackPanel> Now I want to achive something like this: when there is not enough space for another element in the StackPanel it should be placed in new line. How I can achive this (it's not necessary to use stackpanel)? PS: My goal is to place text and images in one line (it can of

Load local html file in WebView Metro Style app

别说谁变了你拦得住时间么 提交于 2019-12-30 08:16:38
问题 I'm having a bit of trouble loading an html file in a WebView control in a metro style app. I've been searching the internet and found out that you can't load a local html file with the NavigateTo method. I also found out that there is a workaround in which you can use the NavigateToString method of the control. Below is the link where i saw this: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/9cd8614d-2dc8-48ac-9cd9-57b03a644930 Someone in a post on that topic gave an

Load local html file in WebView Metro Style app

旧城冷巷雨未停 提交于 2019-12-30 08:15:12
问题 I'm having a bit of trouble loading an html file in a WebView control in a metro style app. I've been searching the internet and found out that you can't load a local html file with the NavigateTo method. I also found out that there is a workaround in which you can use the NavigateToString method of the control. Below is the link where i saw this: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/9cd8614d-2dc8-48ac-9cd9-57b03a644930 Someone in a post on that topic gave an

BlankPage constructor cannot initialize components

我是研究僧i 提交于 2019-12-30 04:03:14
问题 I'm starting learning XAML and I add some code to my BlankPage application. And suddenly a constructor which is initializing a component: public BlankPage() { this.InitializeComponent(); } Stop working. I've got now that error: 'BlankApplication.BlankPage' does not contain a definition for 'InitializeComponent' and no extension method 'InitializeComponent' accepting a first argument of type 'BlankApplication.BlankPage' could be found (are you missing a using directive or an assembly reference