windows-store-apps

Error CS0117: 'System.Type' does not contain a definition for 'GetTypeCode'

巧了我就是萌 提交于 2019-12-30 23:14:09
问题 Can someone please help me learn how to read and navigate the msdn docs? Is this not supported in .net 4.0+ ? using System; ... public static bool IsPositive( object Value, bool ZeroIsPositive ) { switch ( Type.GetTypeCode( Value.GetType() ) ) { case TypeCode.SByte: I'm finding it very difficult to find my way through the docs and know what applies to Windows Store Apps specifically... 回答1: Type.GetTypeCode() is supported in full .NET apps and non-Store portable class libraries, but not in

Windows.Web.Http.HttpClient + WEB API Windows Authentication

只愿长相守 提交于 2019-12-30 10:39:07
问题 Im using Windows.Web.Http.HttpClient to connect to my WEB API. Application haven't prompted for userid and password, but recently i changed WEB API by moving AuthorizeAttribute filter from Action to Class level. Now my Windows store 8.1 application prompt for user id and password. Please let me know how to set HttpClient to not prompt the login and password. Can any1 suggest me do i need to add header to my httpcleint using (Windows.Web.Http.HttpClient httpClient = new Windows.Web.Http

Copying the content from a WebView under WinRT

喜欢而已 提交于 2019-12-30 07:30:46
问题 I've got a WebView with some HTML content which I want to convert into RTF. I've looked at the RTF conversion functions out there and they all look a little flaky to be honest. So my idea is to copy content from the WebView into a RichEditBox , and save to RTF from there. I've seen this example numerous times. WebBrowser1.Document.ExecCommand("SelectAll", false, null); WebBrowser1.Document.ExecCommand("Copy", false, null); Unfortunately, WinRT's WebView control doesn't have a Document

Copying the content from a WebView under WinRT

无人久伴 提交于 2019-12-30 07:30:06
问题 I've got a WebView with some HTML content which I want to convert into RTF. I've looked at the RTF conversion functions out there and they all look a little flaky to be honest. So my idea is to copy content from the WebView into a RichEditBox , and save to RTF from there. I've seen this example numerous times. WebBrowser1.Document.ExecCommand("SelectAll", false, null); WebBrowser1.Document.ExecCommand("Copy", false, null); Unfortunately, WinRT's WebView control doesn't have a Document

JSON.NET DeserializeObject to List of Objects

巧了我就是萌 提交于 2019-12-30 01:35:42
问题 I'm trying to Deserialize object to list of object using JSON.NET lib. My json file is: [ { "id": 1, "name": "Poczta", "description": "Opis", "latitude": 52.25197, "longitude": 20.896355, "accuracy": 0, "type": "", "image": null }, { "id": 2, "name": "WAT", "description": "Budynek główny - sztab.\r\nzażółć gęślą jaźń", "latitude": 52.2531213, "longitude": 20.8995849, "accuracy": 0, "type": "Uczelnia", "image": null }, { "id": 3, "name": "Przychodnia", "description": "Opis", "latitude": 52

Calculate Horizontal Offset to scroll ListView to the center of the SelectedItem

为君一笑 提交于 2019-12-30 01:35:15
问题 I am building a photo application, using a FlipView and a listView as a Pagination. When I click on the thumbnail picture in the ListView it shows me the same picture in the FlipView . And when I swipe into the FlipView , any photo selected will select the same picture in the ListView . This is done by adding to both of them: To the ListView : SelectedIndex="{Binding Path=SelectedIndex, ElementName=flipView1, Mode=TwoWay} And to the FlipView : SelectedIndex="{Binding Path=SelectedIndex,

DataPackage.SetDataProvider doesn't wait (unlike its documentation states)

≡放荡痞女 提交于 2019-12-29 09:56:14
问题 DataPackage.SetDataProvider's documentation states: Use the SetDataProvider method when your app ... does not want to supply the data until the target app requests it. But when I run the following code it calls the callback method immediately. static void CopyToClipboardReference(string s) { DataPackage dataPackage = new DataPackage(); reference = s; dataPackage.SetDataProvider(StandardDataFormats.Text, CopyToClipboardAction); Clipboard.SetContent(dataPackage); } static string reference;

Do Windows 8 Store apps have a MessageBox equivalent?

∥☆過路亽.° 提交于 2019-12-29 07:35:07
问题 Do Windows 8 Store apps have something like a MessageBox? I need something like a popup window to show the user e.g. when a input is wrong or a error happened. Is there something already in the API or do I have to make my own? 回答1: You're looking for the MessageDialog class 回答2: Modern UI guidelines sugest inline error messages for input. However, if you still want a MessageBox, you can have it in the MessageDialog. MessageDialog dlg = new MessageDialog("Message"); await dlg.ShowAsync(); 回答3:

How to access any control inside Hubsection Datatemplate in Windows 8.1 store

谁都会走 提交于 2019-12-29 07:35:07
问题 Please tell me how to access flipview control inside Hubsection * DataTemplate * 回答1: I don't know if you managed to solve your problem already. If you didn't here is how. private DependencyObject FindChildControl<T>(DependencyObject control, string ctrlName) { int childNumber = VisualTreeHelper.GetChildrenCount(control); for (int i = 0; i < childNumber; i++) { DependencyObject child = VisualTreeHelper.GetChild(control, i); FrameworkElement fe = child as FrameworkElement; // Not a framework

How to Clip content with rounded corners in Windows Store App

百般思念 提交于 2019-12-29 05:22:14
问题 I've attempted to have a <Grid/> (with interactive stuff inside, not just an image) clipped with rounded corners (a <Border/> or a <Rectangle/> , whatever works). I've attempted multiple solutions, but none of them was compatible with a Windows Store App. No brush: RadialGradientBrush is not supported in a Windows App project. DrawingBrush is not supported in a Windows App project. The type 'VisualBrush' was not found. Verify that you are not missing an assembly reference and that all