windows-runtime

Caliburn Micro GoBack to previous page instance WinRT

对着背影说爱祢 提交于 2019-12-06 15:28:31
I am using Caliburn.Micro.Core.2.0.1 on Windows Phone 8.1 (WinRT) application All my ViewModels extends Screen as the base. In my MainView(Model) I am able to navigate to a SettingsView(Model) with CM's INavigationService using private readonly INavigationService _navigationService; public void Navigate() { _navigationService.NavigateToViewModel<SettingsViewModel>(_param); } Then using the Hardware Back Button or public void GoBack() { _navigationService.GoBack(); } I can navigate back to the MainView(Model). It works; however, it does not work as I expected or wanted it to work. When the

Crop image with dynamic rectangle coordinate

此生再无相见时 提交于 2019-12-06 15:22:00
问题 I have a Image and I want crop it by using a rectangle, code below is the code I put a image and draw a rectangle at middle of the image: MainPage.Xaml: <Canvas x:Name="canvas" HorizontalAlignment="Center" VerticalAlignment="Center" Width="340" Height="480" Background="Blue"> <Image x:Name="photo" HorizontalAlignment="Center" VerticalAlignment="Center" ManipulationMode="All"> <Image.RenderTransform> <CompositeTransform/> </Image.RenderTransform> </Image> <Path Stroke="Black" StrokeThickness=

Sending files via bluetooth from winRT to android / WP devices

家住魔仙堡 提交于 2019-12-06 14:39:21
I am developing a windows store app and trying to send files via bluetooth to android (and windows phone) devices. Based on an example from MSDN I wrote the following code: public async static void SendAsync(StorageFile file) { var id = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.ObexObjectPush); var devices = await DeviceInformation.FindAllAsync(id); // -> Returns one windows phone and two android devices if (devices.Count > 0) { // Use the 3th device (android tablet) var service = await RfcommDeviceService.FromIdAsync(devices[2].Id); // Create a socket and connect to the target

Optimal Database to be used for metro apps?

China☆狼群 提交于 2019-12-06 14:38:30
I am new to windows 8 metro apps development and i need your help in figuring out my doubt about the database support to metro applications ? i am developing a application which requires reasonably huge amount of data to be stored in its database , it would require many tables and relation between them , with help of this i can fetch the data from database and show it to user , and perform the required operations on it and sync the data when internet connection is there. Please let me know which is the optimal database for metro applications for me to use in my app. As per my knowledge these

WinRT GridView But No GridViewColumn

随声附和 提交于 2019-12-06 14:37:11
I do not have Windows 8 and Metro installed. My question is based on the documentation. It appears DataGrid is gone but ListView and GridView remain. GridViewColumn is gone. I get the tile nature of Metro. My question is can GridView be configured for a row column presentation? I have an app that for the most part would present great under Metro and would benefit from rights contracts. But there is one page were I need old school GridViewColumn like presentation. Thanks I'm not sure if I got your question. You want elements added to a ListView/GridView are displayed in a row? I use for the

Render control into image in WinRT metro

别来无恙 提交于 2019-12-06 14:00:05
I'm creating an application for windows 8 metro, I need to render a framework control into an image and save it to hard disk but do not know how. Can I use SharpDX for this? How can I do? Thanks in advance for the help If you follow through this thread the limitations of Metro and the reasons why it won't work are explained. The essence of it is: Sorry, but rendering Xaml to an element or capturing a screenshot of your own app did not make it into the release version. It is by design that an app cannot capturing a screenshot of another app. A workaround mentioned is: What I meant was - you can

Is there a way to find the PackageFamilyName at runtime?

别来无恙 提交于 2019-12-06 13:49:19
问题 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. 回答1: 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

Change Caret Color in WinRT?

岁酱吖の 提交于 2019-12-06 13:24:20
So in WPF and Silverlight you could set the caret color for TextBox using TextBox.CaretBrush, but in WinRT it seems in all their wisdom they removed this property. So now if the TextBox is a dark color, since it defaults the caret color to black you can't see it, and if the background color of your TextBox is black the caret ceases to exist completely. I find this completely illogical, there has got to be a way to change the caret color, either pragmatically or something? Does anyone have any ideas? This is not possible. You need to switch your TextBox to light background when it has focus so

Color of startscreen in Windows 8 through Metro DynamicResource?

筅森魡賤 提交于 2019-12-06 13:16:44
问题 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. 回答1: There is no API available to use the currently selected Windows

Could not load Windows.winmd

戏子无情 提交于 2019-12-06 12:49:41
问题 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