windows-phone-8.1

How to send a SMS message from within an Windows Phone 8.1 app

a 夏天 提交于 2020-01-05 12:24:10
问题 I would like to create a Windows Phone 8.1 app that sends the location of the device to a contact in the contact list of the phone via a SMS message. How do I send a SMS message? 回答1: In Windows Phone 8.1, You can send sms using ChatMessageManager : Windows.ApplicationModel.Chat.ChatMessage msg = new Windows.ApplicationModel.Chat.ChatMessage(); msg.Body = "This is body of demo message."; msg.Recipients.Add("10086"); msg.Recipients.Add("10010"); await Windows.ApplicationModel.Chat

Border fail to size to Textblock

左心房为你撑大大i 提交于 2020-01-05 08:56:10
问题 In an attempt to go around the problem described in this other question: Segoe UI Symbol smiley is sometimes colorful, sometimes not (WP8.1 + XAML), I tried the following: wrapping my Textblock with a Border element with rounded-corners (high CornerRadius ). This way I can change the background color of the border and it looks pretty much as if the smiley had a background color itself... almost. There is still a small gotcha I cannot wrap my head around: the height of the TextBlock seems to

Turn on torch with MediaCapture on Windows Phone Silverlight 8.1

流过昼夜 提交于 2020-01-05 08:32:25
问题 My problem is quite simple, I cannot turn on the flash light with the MediaCapture API from windows phone 8.1. (I succedded with the 8.0 API) I built a very simple project with 2 buttons, one to toggle the FlashControl and the other one to toggle TorchControl. There is no crash, no exception. My phones support FlashControl and TorchControl. I also debug step-by-step and everything looks good, values are changed when buttons are clicked. Here is my code: MediaCapture m_captureManager; public

Share two different things in Windows Phone 8.1 C#

て烟熏妆下的殇ゞ 提交于 2020-01-04 17:29:32
问题 I want to share two seperate images on two seperat button clicks. Until now I have used this code protected override void OnNavigatedTo(NavigationEventArgs e) { //showPuzzle(); DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView(); dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested); } private async void DataRequested(DataTransferManager sender, DataRequestedEventArgs args) { DataRequest

Windows Phone Xaml: Force square proportioned container (aspectratio 1:1)

本秂侑毒 提交于 2020-01-04 15:33:19
问题 I need a container with square shape, but it has to be as big as it cans, but without be bigger of the parent. I tried with the choosen answer from here: WPF dynamic layout: how to enforce square proportions (width equals height)? but it creates a square bigger than the parent, what I need is a square that fits with the parent (like when you put in an image Stretch=Uniform). 回答1: You could try something like this: <Grid x:Name="outer" Background="Cyan" Width="200" Height="400"> <Grid

Windows phone 8.1 Flyout hide with behaviour issue

穿精又带淫゛_ 提交于 2020-01-04 06:43:41
问题 What's wrong with the following behavior xaml , nothing happens at run time ( not even a exception). I'm trying to close flyout without code behind logic. <AppBarButton HorizontalAlignment="Left" Label="Pin to dashboard" x:Name="pinBtn"> <AppBarButton.Flyout> <Flyout x:Name="flyout" Placement="Full"> <StackPanel x:Name="stackPanel" HorizontalAlignment="Center" VerticalAlignment="Top"> <TextBlock Text="Save as" HorizontalAlignment="Center" FontSize="16" /> <TextBox Width="275" Style="

Windows Phone 8.1 C# app: critical crash (ExecutionEngineException) only on real device in release mode

橙三吉。 提交于 2020-01-03 18:56:32
问题 Imagine the following struct type: public struct Token : IDictionary<string, Token> { public readonly object Value; public Token(string str) { Value = str; } public Token(IDictionary<string, Token> dict) { Value = dict; } /* IDictionary<string, Token> implementation is here */ } Don't ask me anything about what it does. Implementation doesn't matter, you can throw NotImplementedException in all methods/properties. It is placed in separate portable class library. Then imagine the usage of this

What's the icon needed for Cortana's Help list?

六眼飞鱼酱① 提交于 2020-01-03 15:59:14
问题 So I'm adding voice command recognitions with Cortana in my app. My VCD file is all set and everything is working as expected, so now I have to look for the little things. I have all the needed icons (that I know of) in my app but still when my app appears on the Cortana screen (the "What can I say?" screen), my app appears with a default icon, not added by me. So my question is, what's the missing icon I'm not seeing? p.s: the official Remote Desktop app also shows the same icon so I guess I

Minimum Sizes for Buttons in Windows Phone 8.1

眉间皱痕 提交于 2020-01-03 08:45:10
问题 Ordinary buttons can not be set smaller than 109 px, RadioButtons not smaller than 168px. These limits allow only to place 3 buttons or 2 radio buttons horizontally side by side. Is there a way to make the buttons smaller? 回答1: Some Controls have set as default MinHeight / MinWidth to ThemeResource value. You may change this value while defining a Control or change its Style - you will find there (for example in Button ): // in Style // ... <Setter Property="MinHeight" Value="{ThemeResource

Minimum Sizes for Buttons in Windows Phone 8.1

老子叫甜甜 提交于 2020-01-03 08:44:08
问题 Ordinary buttons can not be set smaller than 109 px, RadioButtons not smaller than 168px. These limits allow only to place 3 buttons or 2 radio buttons horizontally side by side. Is there a way to make the buttons smaller? 回答1: Some Controls have set as default MinHeight / MinWidth to ThemeResource value. You may change this value while defining a Control or change its Style - you will find there (for example in Button ): // in Style // ... <Setter Property="MinHeight" Value="{ThemeResource