windows-phone

Error: GenerateWinPRTManifest

帅比萌擦擦* 提交于 2019-12-23 20:04:30
问题 I've tried to create a new monogame windows phone 8 project, when I tried to run it I got this error: Error 1 The "GenerateWinPRTManifest" task failed unexpectedly. System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Microsoft.Silverlight

Creating RowDefinitions and ColumnDefinitions in code

牧云@^-^@ 提交于 2019-12-23 19:52:32
问题 I developing application for windows-phone, I want to create table with 2 rows an 2 columns I create xaml code for this table <Grid Background="White"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions/> </Grid> I want to create this Grid in code Grid chat_userpicgrid = new Grid(); newgrid.Children.Add(chat_userpicgrid); But I don't know how to create RowDefinitions and

Retrieving thumbnail of a StorageFile (Video) which is located in the localfolder of the app in WP8.1

混江龙づ霸主 提交于 2019-12-23 15:07:23
问题 I'm trying to get the thumbnail of the StorageFile located inside the application package (LocalFolder) of the app. The storage file is a media file which can be image(jpg or png) or a video (mp4 or wmv). Now when i try to get the thumbnail using GetThumbnailAsync(ThumbnailMode) method of the StorageFile class i get a System.Exception : The component cannot be found. error, while the same thing works fine if the file is image or a video which is not inside the app package. Here is the

wp7 player freezes if html5 <video> and isolated storage

一个人想着一个人 提交于 2019-12-23 15:06:32
问题 I have video file located in my application isolated storage and would like to play it from html using video tag. Video player runs and then hangs on "loading..". Can someone manage to get video played using html5 video tag and isolated storage? My observations and tests (HTC HD7, Mango Beta 2 - 7.10.7712.60). I can play this video file using MediaElement or MediaPlayerLauncher. So the file is correct. If I publish this file in internet and change reference to absolute (src="http:/

Send chat message

给你一囗甜甜゛ 提交于 2019-12-23 13:14:05
问题 I have this code: var msg = new ChatMessage(); msg.Body = "Test"; msg.Recipients.Add("number"); var cms = await ChatMessageManager.RequestStoreAsync(); await cms.SendMessageAsync(msg); and I have a problem with the await part of code above. I get exception: Access is denied. In capabilities within appxmanifest I have selected: Chat Message Access (I tried select all, but It didn't work). I cannot find any sample and requirements that must be met. Thanks for your help. 回答1: If you take a look

TimeSpan string format in Windows Phone XAML

社会主义新天地 提交于 2019-12-23 12:33:00
问题 I'm attempting to apply a XAML StringFormat to a TimeSpan property. NOTE This question applies to Windows Phone . For WPF, the correct syntax is: Text="{Binding ElapsedTime,StringFormat={}{0:m\\:ss}}" For Silverlight, it needs single-quotes: Text="{Binding ElapsedTime,StringFormat='{}{0:m\\:ss}'}" But for Windows Phone, no matter what I have tried, the output is always the full "00:00:00.0000000". StringFormat='m\\:ss' StringFormat='{}{0:m\\:ss}' StringFormat='m\:ss' StringFormat=m\\:ss Have

Microsoft.Phone.Tasks namespace is not available

冷暖自知 提交于 2019-12-23 08:05:44
问题 Namespace Microsoft.Phone.Tasks is not available in XAML page code behind file of my Windows Phone application. Please see the screenshot. In the properties windows of the project I see: Target: Windows Phone 8.1 Am I missing an assembly reference or something? 回答1: Windows Phone 8.1 XAML apps don't have Microsoft.Phone.Tasks namespace to make common UI framework with windows Runtime APIs. Still you can code up a few tasks by using Windows.ApplicationModel namespace. As you havent claried

WPF using converter in datatemplate created from xaml text and XamlReader on phone 8

五迷三道 提交于 2019-12-23 05:27:56
问题 I'm generating a DataTemplate using a text xaml like this: var dataTemplate = (DataTemplate)XamlReader.Load(xaml.ToString()); One of the elements is a CheckBox bound with it's converter pointing to a StaticResource: StringBuilder xaml = new StringBuilder(); xaml.AppendFormat(@" <CheckBox"); xaml.AppendFormat(@" IsChecked=""{{Binding [{0}], Converter={{StaticResource stringValueToBoolConverter}}, Mode=TwoWay}}""", header.ID); xaml.AppendFormat(@" />"); The presence of this converter reference

Scrolling page with keyboard shown

淺唱寂寞╮ 提交于 2019-12-23 05:17:26
问题 I have an issue: I have a fixed height page in a scroll view: Here is the page When i popup the keyboard: Now the keyboard has 50% of the screen, i want the visible part of the page to scroll - how to make it. Because if the user wont tape on the page - keyboard wont close, some user will try to scroll till they get to the Send button. Here is my xaml: <ScrollViewer HorizontalAlignment="Stretch" Grid.Row="1" VerticalAlignment="Stretch" Margin="0,0"> <Grid Margin="0" Grid.Row="1"

How to subscribe to events properly in Windows Runtime apps?

旧巷老猫 提交于 2019-12-23 04:54:29
问题 I subscribe to OrientationChanged event in the constructor like this: public SecondPage() { this.InitializeComponent(); deviceOrientationSensor = SimpleOrientationSensor.GetDefault(); if (deviceOrientationSensor != null) { deviceOrientationSensor.OrientationChanged += OrientationChanged; } } and then: private void OrientationChanged(SimpleOrientationSensor sender, SimpleOrientationSensorOrientationChangedEventArgs args) { deviceOrientation = args.Orientation; // the rest... } So the problem