winrt-xaml

Metro (Windows Store App) DateTime Format in XAML

☆樱花仙子☆ 提交于 2019-12-01 17:27:12
I haf a DateTime Property. This is Bound to a Textbox with <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StartDateString, Mode=TwoWay}" x:Name="date" /> In WPF it was possible to format the DateTime Output with the following syntax <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StartDateString, FormatString="dd.mm.yyyy" Mode=TwoWay}" x:Name="date" /> In the Metro Apps (winrt ... Windows Store Apps... how it is called now?), the FormatString property is not possible. Is there another way to do the format in the xaml file? You're right. There isn't a FormatString parameter in

Metro (Windows Store App) DateTime Format in XAML

匆匆过客 提交于 2019-12-01 16:37:18
问题 I haf a DateTime Property. This is Bound to a Textbox with <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StartDateString, Mode=TwoWay}" x:Name="date" /> In WPF it was possible to format the DateTime Output with the following syntax <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StartDateString, FormatString="dd.mm.yyyy" Mode=TwoWay}" x:Name="date" /> In the Metro Apps (winrt ... Windows Store Apps... how it is called now?), the FormatString property is not possible. Is there

Adding MapControl in xaml results in a “Catastropic failure”

主宰稳场 提交于 2019-12-01 15:24:28
I am creating an universal application using Visual Studio Ultimate 2013 Version 12.0.30501.00 Update 2. I am getting Catastrophic failure on adding Map Control in my xaml like this <Maps:MapControl Visibility="Collapsed"/>. I have added xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" in the page header and added 'location' capability to application manifest file. Has anyone faced the same issue? You can test his by creating a sample application and add only MapControl. Please help me to resolve this issue. The problem is observed in normal Windows Phone 8.1 applications also. Am i missing

Adding MapControl in xaml results in a “Catastropic failure”

人走茶凉 提交于 2019-12-01 15:09:40
问题 I am creating an universal application using Visual Studio Ultimate 2013 Version 12.0.30501.00 Update 2. I am getting Catastrophic failure on adding Map Control in my xaml like this <Maps:MapControl Visibility="Collapsed"/>. I have added xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" in the page header and added 'location' capability to application manifest file. Has anyone faced the same issue? You can test his by creating a sample application and add only MapControl. Please help me to

Binding and style doesn't work for Win8?

十年热恋 提交于 2019-12-01 13:24:36
I derived from a TextBox and called it MyTextBox. On my LayoutAwarePage I created 2 SolidColorBrush props: MyBackground and MyBorder. In the Xaml of that page I wrote a ResourceDictionary with style to the control MyTextBox: <Grid.Resources> <ResourceDictionary> <Style TargetType="a:MyTextBox"> <Setter Property="Background" Value="{Binding MyBackground}"></Setter> <Setter Property="BorderBrush" Value="{Binding MyBorder}"></Setter> <Setter Property="Width" Value="200"></Setter> <Setter Property="IsReadOnly" Value="False"></Setter> <Setter Property="BorderBrush" Value="3"></Setter> </Style> <

How to improve performance method GetThumbnailAsync in window phone 8.1

ⅰ亾dé卋堺 提交于 2019-12-01 12:16:05
I write a function to show images on a folder (assume i have about 60 images in this folder) in window phone 8.1. And the problem is function GetThumbnailAsync() take so long time when i create stream to get bitmapImage. Here's my code //getFileInPicture is function get all file in picture folder List<StorageFile> lstPicture = await getFileInPicture(); foreach (var file in lstPicture) { var thumbnail = await file.GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode.PicturesView,50); var bitmapImage = new BitmapImage(); bitmapImage.DecodePixelWidth = (int)(ScreenWidth / 4); await

How to get camera feeds in Windows 8 Metro style app?

瘦欲@ 提交于 2019-12-01 11:39:18
I am trying to get camera feeds in Windows 8 metro style app so that i can make some changes on it something like augmented reality. I have tried but only able to find how to capture images using CameraCaptureUI(). Can anyone tell me how can i achieve camera feeds for AR? sarvesh All you need to do is pass in CameraCaptureUIMode.Video for CaptureFileAsync. Here is a sample CameraCaptureUI dialog = new CameraCaptureUI(); dialog.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4; StorageFile file = null; file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Video); if (file != null) {

Change background color of selected item in listbox

ε祈祈猫儿з 提交于 2019-12-01 11:36:38
First I search here and on web and I find many and many solution how change background color of selected item in listbox in WPF but not how do it in windows store app. This framework is litte different I cant get to work any solution. I use this: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/91575930-2058-413a-99de-f3b31c74dfd9/change-itemtemplate-forground-when-listbox-is-focused?forum=winappswithcsharp on the end of page is very good solution but he set item teplate like this: ItemTemplate="{StaticResource DataTemplate1}" but my listbox has datateplate so I dont know how set

Method to serialize a class which contain BitmapImage : using 2 inherited class?

心不动则不痛 提交于 2019-12-01 11:00:36
When my application closes, I want to serialize some data to make it persistent for the next use of the application. I choose to serialize these data with Newtonsoft.JsonConverter. But, I have a BitmapImage in my class, and it can't be serialized. I'm bit stuck on this because I don't find a solution to keep my BitmapImage into my class (I need to keep it here) and being able to serialize this class. I tried to create a inherited class which contains the BitmapImage, but I'm not allowed to create an implicit operator from my base class. I want to have an object in my class which can be used to

Binding and style doesn't work for Win8?

谁都会走 提交于 2019-12-01 10:47:22
问题 I derived from a TextBox and called it MyTextBox. On my LayoutAwarePage I created 2 SolidColorBrush props: MyBackground and MyBorder. In the Xaml of that page I wrote a ResourceDictionary with style to the control MyTextBox: <Grid.Resources> <ResourceDictionary> <Style TargetType="a:MyTextBox"> <Setter Property="Background" Value="{Binding MyBackground}"></Setter> <Setter Property="BorderBrush" Value="{Binding MyBorder}"></Setter> <Setter Property="Width" Value="200"></Setter> <Setter