microsoft-metro

Retrieve Json data with HttpClient

自作多情 提交于 2019-12-03 13:49:57
I am programming for Visual Studio 2011 so I am forced to use HttpClient . I need to retrieve some JSON data from the web, but I guess I need to set the content to "json data" or something because I always get strange characters when using only this code: HttpClient client = new HttpClient(); var response = client.Get("http://api.stackoverflow.com/1.1/users"); var content = response.Content.ReadAsString(); So how can I set the content or what should I do to get the correct data ? edit: Output: something like this: ������ svick The problem is that the response is compressed and HttpClient does

Grouping GridView in Windows 8 Metro App

北城以北 提交于 2019-12-03 13:23:01
问题 Can someone give me some hints how to accomplish the grouping within a GridView for Metro Apps as shown in the Screenshot below. This Screenshot is from the Developer Resources for Windows Metro Apps, but unfortunately there is no description how to accomplish it. I have the following code snippet: Xaml: ... <Page.Resources> <CollectionViewSource x:Name="cvs" IsSourceGrouped="true"/> </Page.Resources> <Grid Background="{StaticResource DefaultBackground}"> <GridView x:Name="DefaultGridView"

Accepting invalid SSL certificates using WinRT

一个人想着一个人 提交于 2019-12-03 13:09:40
There are scenarios where you want your application to accept invalid SSL certificates (testing environment/ self signed certificates etc). In the .NET world one would use the ServerCertificateValidationCallback class to do so. Unfortunately the class doesn't exist in a WinRT context. I need to consume a Web API using WinRT which is hosted on a server without a valid ssl certificate. How do you accept invalid ssl certificates in WinRT using the HttpClient class or any other appropriate class. Any help or alternatives would much appreciated. in silverlight, it wasn't allowed. I haven't seen

How easy is it to port a Windows Phone 7 application to Metro on a Windows 8 tablet?

假如想象 提交于 2019-12-03 12:53:15
I know that Metro on both platforms shares a common “look and feel” and that WinRt makes use of XAMLand C# (or VB.NET) like Silverlight does on Windows Phone 7. However I also know that WinRT is not Silverlight. Therefore what is the process of creating an app that will work on both a Windows 8 tablet and a Windows 7 (or 7.5) Phone? How close is WinRt to Silverlight? Despite certain people in Microsoft claiming it will only require changing a couple of lines of code... The only possible answer to how difficult it will be to port an app is IT DEPENDS! What does the phone app do? How much of

Windows Phone Panorama with AngularJS

爱⌒轻易说出口 提交于 2019-12-03 12:51:53
I am trying to replicate the Windows Phone Ui in an AngularJS app. Here is an example of what a Windows Phone Ui looks like. Infinite Swipe One interesting thing about it is the panels are infinitely swipe-able. You can keep swiping and end up back at the first panel. To achieve the infinite swipe, I duplicate the first and last panels and add them before and after the original panels like this: If you swipe to a copied panel (like "3" or "1"): you are redirected to the real panel immediately after the swipe finishes. This happens without the user even knowing because there is no animation.

How to find icons for app bar in metro windows 8? [closed]

有些话、适合烂在心里 提交于 2019-12-03 12:34:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How to find icons for app bar in metro windows 8 ? And how can i add custom icons ? 回答1: The default application bar styles use the font Segoe UI Symbol for it's icons, you can use the program Character Map installed with Windows to browse the icons it provides. As well as Metro Studio that eibhrum mentioned you

D8048: cannot compile C file 'openssl\\applink.c' with /ZW option

跟風遠走 提交于 2019-12-03 12:29:12
I am trying to use OpenSSL in my metro application. I created a C++ WinRTComponent and have openssl files under this component However, when I try to compile the project, I got the following error: D8048: cannot compile C file 'openssl\applink.c' with /ZW option Anyone can tell me how should I resolve this problem to get my project to compile? Please let me know if you need any other info to help me. Thanks, The error message is exactly what it says it is - VC++ does not support C++/CX extensions - enabled with /ZW compiler switch - in files compiled as C (which kinda makes sense, since those

How can I make Groups in a Metro GridView use different Layouts?

不想你离开。 提交于 2019-12-03 12:03:27
问题 I'm writing a Windows 8 Metro app. I'm trying to draw a GridView with three Groups. I want one of those groups to layout their items differently than the others. I've used Selectors before in WPF, so I thought that'd be a good route. So I tried the GroupStyleSelector and I found this example on MSDN : public class ListGroupStyleSelector : GroupStyleSelector { protected override GroupStyle SelectGroupStyleCore(object group, uint level) { return (GroupStyle)App.Current.Resources[

How to run a Metro-App from PowerShell on Windows 8?

给你一囗甜甜゛ 提交于 2019-12-03 11:30:00
Related to another question on Superuser , I'm trying to run a Metro based application from the command-line. According to a comment on my superuser question, I could maybe find an answear on a PowerShell command or script. I already tried but found anything on any internet reference about PowerShell and Windows 8... So, there is some specific way/command to call and run a Metro-style application from a PowerShell command on Windows 8? There is no direct way to do this but there are a couple indirect ways. vsdebuglaunchnotify, which comes with Visual Studio, can be called from PowerShell. You

Maximum number of lines for a Wrap TextBlock

亡梦爱人 提交于 2019-12-03 10:47:29
问题 I have a TextBlock with the following setting: TextWrapping="Wrap" Can I determine the maximum number of lines? for example consider the following string TextBlock.Text : This is a very good horse under the blackboard!! It currently has been shows like this: This is a very good horse under the blackboard!! I need that to become something like: This is a very good horse ... any solution? 回答1: Update (for UWP) In UWP Apps you don't need this and can use the TextBlock property MaxLines (see MSDN