windows-phone-8.1

Programmatically dismiss a MessageDialog

橙三吉。 提交于 2019-12-10 18:08:20
问题 On Windows Phone 8.1, how to programmatically dismiss a MessageDialog after the ShowAsync call? I’ve tried calling IAsyncInfo.Close(), it just throws an InvalidOperationException "An illegal state change was requested". I’ve tried calling IAsyncInfo.Cancel(). The dialog stays visible, the only result - after I tap the “Close” button, TaskCancelledException is marshaled to the awaiting routine. Update: exact behavior depends on the sequence of the calls. If IAsyncOperation.Cancel() is invoked

Windows phone 8.1 BackPressed not working properly

梦想的初衷 提交于 2019-12-10 17:34:56
问题 Windows phone 8.1 new to world. Basic function is back button click. Is that function not working properly is this windows phone 8.1. Is that behavior or i'm made mistake. Below code using in Homepage but this code calling from all other class too while clicking back. I need to access below method only on Home page . Please check below code and refer me good solution. Please look my code: public HomePage() { this.InitializeComponent(); Windows.Phone.UI.Input.HardwareButtons.BackPressed +=

Reading and writing on a text file Windows Phone 8.1

给你一囗甜甜゛ 提交于 2019-12-10 16:58:24
问题 My objective is to save "textbox" input to a text file and then being able to load that saved text from the same text file back to a textbox. I think that one of my mistakes is reading on Console. namespace aaa { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { string fileName = "test.txt"; FileStream fs = null; fs = new FileStream(fileName, FileMode.CreateNew); StreamWriter writer

Beacons in Windows Phone 8.1 - there are no possibilities?

点点圈 提交于 2019-12-10 16:28:50
问题 First of all, yes, i have read all other similar questions. Secondly, i am developing app (WP 8.1 WinRT), which must use Beacons. I read a lot about it, and i know, that generally connection with BLE device is not possible without pairing it first. But hope dies last, so i want to ask about any possibilities I have. It is possible to pair devices in code (according to articles I have read - its not, but maybe someone know the way)? Or just obtain nearby Beacons Id or Name, or ANY information

What is AgHost.BackgroundTask as background task in Windows Phone Silverlight 8.1?

回眸只為那壹抹淺笑 提交于 2019-12-10 16:23:37
问题 When I create a new Windows Phone SIlverlight 8.1 app, there is a background task in the manifest: <Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask"> <BackgroundTasks> <Task Type="systemEvent" /> </BackgroundTasks> </Extension> What is it? Is it safe to remove? The only reference I could find is not very helpful http://msdn.microsoft.com/en-us/library/windowsphone/develop/dn642084.aspx 回答1: AgHost.exe is the foreground process. This entry point is to allow you

How to add / remove default tile / secondary tile for Windows phone 8.1 (universal) applications from code?

烂漫一生 提交于 2019-12-10 16:19:46
问题 n windows phone 8 silverlight application we can add / remove tiles from the code as below ShellTile.Create(tileUri, tileData, true); and we can get the tiles based on the Uri like below ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("/")); How we can do similarly in windows phone 8.1 (universal) applications? I could not get clear information or samples. 回答1: When you want to create a tile, you can do it as in this answer: SecondaryTile tileData = new

How to send and receive push notifications for Windows Phone 8.1

浪尽此生 提交于 2019-12-10 16:15:04
问题 I followed Microsofts article about sending and receiving push notifications on Windows Phone 8.0: https://msdn.microsoft.com/en-us/library/windows/apps/hh202967(v=vs.105).aspx It works fine, but now we are creating a new Windows Phone 8.1 app and try to rewrite the same 8.0 code, but some classes are not available in WP 8.1. Please help me how we can implement these for Windows Phone 8.1. 回答1: Here is my class which I use for receiving push notifications and handling the ChannelUri . Just

Windows Phone 8.1 app Multi language

假装没事ソ 提交于 2019-12-10 15:35:44
问题 I am creating windows phone app 8.1 in SilverLight with Visual Studio 2015. I am creating multi language app in English and Arabic. For that I have created Strings folder in the project with two folder of en-US and ar-KW with Resources.resw file in each folder. I am x:Uid setting properties. For example Key:- Actual.Text Value:- Actual <TextBlock x:Uid="Actual" TextWrapping="Wrap" MaxWidth="65" HorizontalAlignment="Center" /> Above is working very good. I have combobox with Item EN and AR. I

Windows (Phone) 8.1 Camera Use

瘦欲@ 提交于 2019-12-10 15:06:59
问题 I am creating a Windows Universal application. I want to the user to be able to upload a picture and the user should have the option of taking one on the spot and sending that. I have this working using the MediaCapture api. However I can only seem to use one camera, so for example if my phone has a front and a back camera only the front camera is used. How would I be able to switch the camera that is in use? I had read something somewhere about using something like this: private static async

How can I format a DatePicker to display the date format day / month / year?

依然范特西╮ 提交于 2019-12-10 14:57:55
问题 I'm using the Windows Phone 8.1 DatePicker It's displaying the date as month/day/year by default and I can't see any way to change this to the 'correct' way of day/month/year . This is how I declare the DatePicker <DatePicker Name="datePicker" HorizontalAlignment="Center" MonthFormat="{}{month.full}"/> displaying it as I can see in the linked msdn article that I can use a DateTimeFormatter in conjunction with ComboBox selectors but that's not an option for me. Is it possible? 回答1: To Edit the