windows-runtime

Size limit of local folder?

烂漫一生 提交于 2019-12-10 15:13:36
问题 My C#/XAML WinRT app makes use of ApplicationData.LocalFolder to store data. I'm wondering if there's any size limit for this folder. I didn't find any information on the web/MSDN... Is this folder limited in size or not? 回答1: As you can read in the documentation available at http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx: There are no general size restriction on local data stored. 来源: https://stackoverflow.com/questions/12857077/size-limit-of-local-folder

How can I format a DatePicker to display the date format day / month / year?

依然范特西╮ 提交于 2019-12-10 14:57:55
问题 I'm using the Windows Phone 8.1 DatePicker It's displaying the date as month/day/year by default and I can't see any way to change this to the 'correct' way of day/month/year . This is how I declare the DatePicker <DatePicker Name="datePicker" HorizontalAlignment="Center" MonthFormat="{}{month.full}"/> displaying it as I can see in the linked msdn article that I can use a DateTimeFormatter in conjunction with ComboBox selectors but that's not an option for me. Is it possible? 回答1: To Edit the

Windows 8 and F# [closed]

霸气de小男生 提交于 2019-12-10 14:55:19
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . So, since one cannot build metro style apps with F# and it isn’t possible to reference a F# library from within a metro style app,

Display svg in Metro App with c# and xaml

倖福魔咒の 提交于 2019-12-10 14:55:07
问题 I'm working at a Windows 8 Metro Application with XAML and C# I have got a Uri to a SVG Image, which really works, but I have no Idea how to get this Image and display it in the XAML. Or is it impossible to work with SVG în .NET Core? 回答1: Or is it impossible to work with SVG în .NET Core? The .NET Metro Profile is NOT the .NET 4.5 Full Profile or even the .NET Client Profile. One of the requirements or limitations of the Metro application is the inability to link to any content not compiled

Macro to recognize WinRT?

安稳与你 提交于 2019-12-10 14:44:56
问题 Is there a new macro to determine in code if the application is running on WinRT? As I'm working with LoadLibrary , it would be great if there is a macro to replace all calls to LoadLibrary with one to LoadPackagedLibrary ... I'm understanding the documentation correct as in I can load any DLL (as long as it's inside my package) via LoadPackagedLibrary , right?! (And as long as that DLL doesn't use black-listed APIs...) 回答1: I recently updated to Visual Studio 2012, and think I found the

Convert ImageSource to WriteableBitmap in Metro Windows 8

天大地大妈咪最大 提交于 2019-12-10 14:43:02
问题 I was wondering how I could go about converting an ImageSource object (in my case the source property of an image element) to a WriteableBitmap . The WriteableBitmap(BitmapSource) constructor doesn't work in Windows 8 Metro, so I can't do that. I've tried to load the ImageSource object into a stream and then use WriteableBitmap.SetSource(stream) , but I can't figure out how do load the image in a stream either. InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream(); BitmapEncoder

Saving image form Clipboard

做~自己de王妃 提交于 2019-12-10 14:38:40
问题 i want to save one Image inside clipboard in winrt to file. but i found no way. can you help please? var dataPackage = Clipboard.GetContent(); var t = await dataPackage.GetBitmapAsync(); var t2 = await t.OpenReadAsync(); t2.AsStream(); t2.Seek(0); BitmapImage bitmapImage = new BitmapImage(); bitmapImage.SetSource(t2); Image image = new Image(); image.Source = bitmapImage;< 回答1: Here you go :) Please note you can't use ANY folder to save. I have passed ApplicationData.Current.LocalFolder.Path

Disable navigation on FlipView

落爺英雄遲暮 提交于 2019-12-10 14:16:18
问题 I would like to disable all navigation on my FlipView (scrolling horizontally) from user's input (e.g. mouse wheel and touch screen). The only way the flipview is supposed to change its selected index is programatically, I have already removed the side buttons in the FlipView 's style. I tried changing some of the ScrollViewer 's properties in its style but I can't manage to block everything. Anybody can hint me the correct and clean way to do this? 回答1: I found the solution by overriding the

Global Dispatcher in WinRT?

帅比萌擦擦* 提交于 2019-12-10 13:55:20
问题 I have some WP7 code that looks like this: using System.Windows; using System.Windows.Threading; public static class GlobalDispatcher { public static Dispatcher Current { get { return Deployment.Current.Dispatcher; } } } What is the equivalent in WinRT? Is there no globally accessible Dispatcher (or CoreDispatcher) object? 回答1: You will want to use Window.Current.Dispatcher . 回答2: Just adding this as answer, as it better solves the problem in my opinion: Window.Current is null if the

How do I add watermark text to a bitmap in WinRT?

ぐ巨炮叔叔 提交于 2019-12-10 13:54:52
问题 I would like to do something like this http://weblogs.asp.net/broux/archive/2011/02/08/silverlight-how-to-watermark-a-writeablebitmapimage-with-a-text.aspx. I am having a tough time getting this to work in WinRT. I am using the WriteableBitmap extensions to "render" some text but I want it to look exactly like it looks in this example. Any suggestions or help? 回答1: You could render that text to a png asset and blit it on top of the bitmap. Unless the text needs to be dynamic - then you'd need