windows-store-apps

Windows 8.1 Store app MAKEPRI build error

与世无争的帅哥 提交于 2019-12-11 11:08:34
问题 I keep getting the following two errors while building any newly created project, or old for Windows Store projects with Visual Studio 2013 Error 1 Initializing Indexer c:\Temp\App4\App4\MakePri App4 Error 2 Schema Validation Failed. The attribute 'targetOsVersion' on the element 'resources' is not defined in the DTD/Schema. c:\Temp\App4\App4\MakePRI App4 Turning the MSBuild project build output verbosity to Diagnostic I see the following 2>Using "GenerateProjectPriFile" task from assembly "C

System.TypeLoadException Could not find Windows Runtime type 'Windows.Foundation' exception

拥有回忆 提交于 2019-12-11 11:03:09
问题 In my Windows Phone 8.1 app I'm creating a CustomPage and then navigating to it, all in code behind. My CustomPage class is: using Windows.UI.Xaml.Controls; namespace TestApp { public class CustomPage : Page { public CustomPage() { this.BuildPage(); } private void BuildPage() { var panel = new StackPanel(); panel.Children.Add(new TextBlock { Text = "Hello World" }); this.Content = panel; } } } And then in my MainPage.xaml.cs I'm doing this: CustomPage myNewPage = new CustomPage(); Frame

C# Convert BitmapImage object to ByteArray

大兔子大兔子 提交于 2019-12-11 11:01:18
问题 How do I convert an object of BitmapImage type to a byte array? There's plenty of examples out on the web but all of them are using methods that no longer exist for windows Store app. best solution I've found is this, however I get an exception on the first code line when trying to run it public static byte[] ConvertBitmapToByteArrayAsync(WriteableBitmap bitmap) { using (var stream = bitmap.PixelBuffer.AsStream()) { MemoryStream memoryStream = new MemoryStream(); stream.CopyTo(memoryStream);

Incremental Loading and snapped visual state

拥有回忆 提交于 2019-12-11 10:58:37
问题 I have a listview(for snapped state) and a gridview(for normal state) in my app page (which is an items page template ) and they are both bound to a collection that implements ISupportIncrementalLoading interface. Here are the implemented methods: public HasMoreItemsDelegate MoreItemsExist { get; set; } public LoadMoreItemsDelegate<T> ItemsLoadAsync { get; set; } public bool HasMoreItems { get { return this.MoreItemsExist(); } } private bool isLoading; public bool IsLoading { get { return

How to get methods declared in Base class using Reflection?

﹥>﹥吖頭↗ 提交于 2019-12-11 10:54:36
问题 I am trying to invoke methods using Reflection in Windwos 8 store application. I tried to get list of all methods from a base class method using this.GetType().GetTypeInfo().DeclaredMethods. var methodList = base.GetType().GetTypeInfo().DeclaredMethods; I am able to get all methods declared in the child class and invoke them. But i am unable to get list of methods defined in the base class. what is wrong with the approach? this project built using .Net for Windows store 回答1: GetType()

MVVM: How to call method on view from view model?

天涯浪子 提交于 2019-12-11 09:58:46
问题 I am quite new to MVVM, so sorry for probably simple question. However, I can not understand which mechanism from MVVVM (I am using MVVMLight if that is of any consequence) to use in order to program the simple following scenario: I have textbox TB, where user can fill in URL. Than I have a button B and webview WV. If user clicks on button, the app should take the text from TB and display it in the WV. I knwo that I can create a property in viewmodel and bound it to TB.Text. I understand

Convert String to type of Page?

末鹿安然 提交于 2019-12-11 09:48:23
问题 I want to Convert a string DashBoard to a type of page named as DashBoard because I wanted to use it in navigation purpose. Normally I navigate to some page like this this.Frame.Navigate(typeof(DashBoard)); but I want to DashBoard page to be replaced by variable like this this.Frame.Navigate(typeof(Somestring)); 回答1: You could use the Type.GetType(string) [MSDN] this.Frame.Navigate(Type.GetType(My.NameSpace.App.DashBoard,MyAssembly)); Read the remarks section on how to format the string. Or

Scroll to a Control in a ScrollViewer

本小妞迷上赌 提交于 2019-12-11 09:47:24
问题 In my windows store 8 metro style app, I have a scroll viewer for scrolling items of stack panel. I want to scroll the scroll bar automatically when ever a selection is changed dynamically and selected item is not in visible area. For eg : These tabs are Section tabs. When ever user clicks on skip button, the selected section is skipped and next section is selected.When user skips the last section then he jumps to the first section,but here scroll viewer does not scroll to the first tab

Will a Windows Store app always disallow a self-signed certificate even if explicitly trusted?

混江龙づ霸主 提交于 2019-12-11 09:43:55
问题 I've seen both this and this — same problem, different question. I'm trying to connect my Windows 8.1 Store app to an ASP.NET Web API web service, secured over HTTPS using a self-signed certificate. It's a proof-of-concept application that will end up on < 5 different machines and seen only internally, so I was planning to just install the certificate as trusted on each of the target machines. When I try this on my development setup, both HttpClient APIs fail to establish the trust

Will it be possible to install an app to the Surface without passing from Microsoft App Store?

别说谁变了你拦得住时间么 提交于 2019-12-11 09:25:22
问题 I am planning to realize apps to be used from Surface Win8 new tablet. Will it be necessary to pass from the new Windows App Store (as it happens for iOS) or will I be able to distribute the .exe without passing from Microsoft? 回答1: As far as I aquired information. There are assumptions that the standard Surface have no Desktop mode. That means the pad will be purely comparable with Android and iOS. The Pro version will instead also be delivered with desktop mode also. In normal terms "full