windows-runtime

sqlite in windows runtime component

北城余情 提交于 2019-12-04 22:12:56
am trying to use sqlite in a windows runtime component. But I get some 219 errors when i add the nuget sqlite-net package. couldnt figure it out anywhere. Any similar issues ? I finally used a store app class library to use sqlite and called those methods in it from my windows runtime component. method in store app public async Task<IEnumerable<TaskGroup> > GetTaskGroup() { return await conn.QueryAsync<TaskGroup>("select * from TaskGroup"); } calling method in win runtime component public IAsyncOperation<IEnumerable<TaskGroup>> GetAllTaskGroup() { return m_objDAL.GetTaskGroup()

how to view specific setting page in **winrt** application using C#?

社会主义新天地 提交于 2019-12-04 21:44:24
how to view specific setting page in winrt application using C# from outside button click? In javascript i found like this WinJS.UI.SettingsFlyout.showSettings("About", "/Settings/About.html") But i could not able to find this in c#,I am using callisto for Setting Flyouts I'm using Callisto and C# too, and this is how I solved the problem. void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { var settings = new SettingsCommand("settings", "Settings", new UICommandInvokedHandler(showSettings)); args.Request.ApplicationCommands.Add(settings); var credits =

Loading Loose Xaml with custom controls on WinRT fails unless dummy DataTemplate exists

混江龙づ霸主 提交于 2019-12-04 21:22:05
In ReactiveUI, I run this code at a certain point: const string template = "<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:routing='using:ReactiveUI.Routing'>" + "<routing:ViewModelViewHost ViewModel=\"{Binding}\" VerticalContentAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\" IsTabStop=\"False\" />" + "</DataTemplate>"; var theTemplate = XamlReader.Load(template); On other platforms, this works great (the xmlns declaration is different of course), but on {WinRT / Metro / Windows Store}, this throws an Unspecified Error: WinRT information: The

WinRT image handling

有些话、适合烂在心里 提交于 2019-12-04 20:17:20
问题 A friend and I spent the better part of last night nearly tearing our hair out trying to work with some images in a metro app. We got images into the app with the share charm, and then I wanted to do some other work with them, cropping the images and saving them back into the appdata folder. This proved extremely frustrating. My question, at the end of all this, is going to be "What's the proper way of doing this, without feeling like I'm hammering together a bunch of mismatched jigsaw puzzle

How to create informative toast notification in UWP App

人盡茶涼 提交于 2019-12-04 20:06:38
问题 In my app, I want to inform user when particular action had performed, like record updated successfully or new record added, but there's not inbuilt control to that can display such information. Is there anything similar to Android Toast.makeText for UWP? 回答1: Yes, UWP has Toast Notifications :) Here is sample code to display simple notification: private void ShowToastNotification(string title, string stringContent) { ToastNotifier ToastNotifier = ToastNotificationManager.CreateToastNotifier(

Is there a way to find the PackageFamilyName at runtime?

徘徊边缘 提交于 2019-12-04 19:49:26
Is there a way to figure out the PackageFamilyName (as appearing in the manifest) in runtime? I looked in /Program Files/WindowsApps and could not find the relevant string there. Could not find any API that would let me do this... Any other ideas are welcome. I think what you're looking for is PackageId.FamilyName which is available through the Package.Current.Id.FamilyName property. Source: MSDN Forums 来源: https://stackoverflow.com/questions/15333375/is-there-a-way-to-find-the-packagefamilyname-at-runtime

Could not load Windows.winmd

家住魔仙堡 提交于 2019-12-04 19:02:33
I am following the following example from here to use WinRT API's in a Win32 Application. I added references to System.Runtime and System.Runtime.InteropServices.WindowsRunTime but when I add the reference to Windows.winmd I get the following error: Error 1 Problem generating manifest. Could not load file or assembly 'C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' or one of its dependencies. Attempt to load a program with an incorrect format. I tried various configurations using different .NET frameworks and versions of Visual Studio. What can I

Color of startscreen in Windows 8 through Metro DynamicResource?

偶尔善良 提交于 2019-12-04 18:22:07
I've looked through Generic.xaml and ThemeResources.xaml in the following path: C:\Program Files (x86)\Windows Kits\8.0\Include\WinRT\Xaml\Design However, they don't seem to contain a resource key that I can use in order to retrieve the color of the current scheme selected in the Windows 8 start screen. The color I am trying to retrieve through a DynamicResource in the XAML is seen visually below, to demonstrate my point. There is no API available to use the currently selected Windows theme color. Yes, no API unluckily. What about this workaround? http://blog.quppa.net/2013/01/02/retrieving

How to remove ListView's add item animation?

本小妞迷上赌 提交于 2019-12-04 18:17:21
问题 I have a ListView and I edited its ItemContainerStyle to modify some style but I don't know how to remove that annoying animation when you add an item. With an ItemsControl , when you add a new item, it appears instantly, without any animation. With ListView , the item takes a while and then, it starts an animation to show up. I just want to remove that add animation and when I click on Add item it appears instantly, no extra stuff. I think that it should belong to ItemContainerStyle but even

WinRT: how to save WriteableBitmap to localfolder

丶灬走出姿态 提交于 2019-12-04 17:39:07
How to save a WriteableBitmap to localfolder using C# in WinRT? You can check WinRT XAML Toolkit for a set of extension methods to do exactly what you need: http://winrtxamltoolkit.codeplex.com/SourceControl/changeset/view/0657c67a93d5#WinRTXamlToolkit%2fImaging%2fWriteableBitmapSaveExtensions.cs Mayank Here are bits and pieces of the answer var bitmap = new WriteableBitmap(width,height); var stream = bitmap.PixelBuffer.AsStream(); than you can get IOutputStream from Stream to write the data into the local folder. this post explains how to convert Stream to byte[] and this explains how to