windows-phone-8.1

Getting the current page when receiving a toast notification (WP8.1 Silverlight, receiving WNS toast notification)

对着背影说爱祢 提交于 2019-12-13 19:26:29
问题 I have an event that fires when the app is live and I receive an notification CurrentChannel_PushNotificationReceived . In this function I want to find out which page is currently displayed to know if the notification should update content on the page. The question is therefore twofold, how to know which page is currently displayed and interact with the toast notification. Update The issue is that I cannot interact with the elements because of clash with the OS threading (Dispatcher).

Windows Phone 8.1 one line equivalent for getPixels & createBitmap from Android?

a 夏天 提交于 2019-12-13 17:54:44
问题 I'm porting over some code from an Android app using the android-jhlabs library to a Windows Phone 8.1 runtime app. The code is quite simple and basically looks like the following (in Java): PointillizeFilter filter = new PointillizeFilter(); filter.setEdgeColor(Color.BLACK); filter.setScale(10f); filter.setRandomness(0.1f); filter.setAmount(0.1f); filter.setFuzziness(0.1f); filter.setTurbulence(10f); filter.setGridType(PointillizeFilter.SQUARE); int[] src = AndroidUtils.bitmapToIntArray

“Value does not fall within the expected range” when opening RandomAccessStream

我的梦境 提交于 2019-12-13 17:04:57
问题 I have been struggling with this problem for days. Why do I get " Value does not fall within the expected range " exception in this conversion method? (it's windows phone 8.1 app) public static async Task<string> ConvertToBase64(this BitmapImage bitmapImage) { RandomAccessStreamReference rasr = RandomAccessStreamReference.CreateFromUri(bitmapImage.UriSource); var streamWithContent = await rasr.OpenReadAsync(); //raises an exception byte[] buffer = new byte[streamWithContent.Size]; var result

how to enable Wi-Fi and search for networks on windows phone emulator

被刻印的时光 ゝ 提交于 2019-12-13 16:25:42
问题 Can I enable wifi on my windows phone emulator? I want so see networks available in emulator like I see on a real mobile Phone. I am using VS 2013, and working on a laptop with wifi. When I click the on button on Wi-Fi settings it remains in a loop. I already managed to give internet acces to my emulator. But I wish to search for wifi networks. Thank you 回答1: No you can't enable WiFi on your Windows Phone Emulator because the emulator is actually a virtual OS running on Hyper-V, which is

TextBlock Won't Update

百般思念 提交于 2019-12-13 16:19:25
问题 I have a TextBlock ( caloriesAvailableTextBlock ) which I am trying to update. The Button ( eatCaloriesButton ) is supposed to reduce the number which the TextBlock is bound to by 100. However, the TextBlock will not update. It just remains at 2000. Any ideas what I am missing? My xaml in HubPage.xaml: <StackPanel> <TextBlock TextWrapping="Wrap" Text="Calories Available:" FontSize="24"/> <TextBlock x:Name="caloriesAvailableTextBlock" Loaded="caloriesAvailableTextBlock_Loaded" TextWrapping=

Slider's behaviour depending on minimum-maximum range

倾然丶 夕夏残阳落幕 提交于 2019-12-13 15:58:15
问题 I'm working on Windows Phone 8.1 Runtime and I've encountered strange problem. Let's define two almost identical Silders : <Slider Header="Values 0.1-0.9" Grid.Row="0" HorizontalAlignment="Stretch" TickFrequency="0.05" TickPlacement="Inline" Minimum="0.1" Maximum="0.9" Value="0.2"/> <Slider Header="Values 1.0-9.0" Grid.Row="1" HorizontalAlignment="Stretch" TickFrequency="0.5" TickPlacement="Inline" Minimum="1" Maximum="9" Value="2"/> As you can see the second Slider differentiate from the

MVVM: Image Bind Source from FileOpenPicker

限于喜欢 提交于 2019-12-13 15:24:19
问题 I added the OnActivated() into app.xaml.cs it is work correctly: protected async override void OnActivated(IActivatedEventArgs args) { var continuationEventArgs = args as IContinuationActivatedEventArgs; if (continuationEventArgs != null) { switch (continuationEventArgs.Kind) { case ActivationKind.PickFileContinuation: FileOpenPickerContinuationEventArgs arguments = continuationEventArgs as FileOpenPickerContinuationEventArgs; string passedData = (string)arguments.ContinuationData[

Listview applies a check to other listview items having a checkbox when page navigation is returned

久未见 提交于 2019-12-13 14:00:19
问题 I have a ListView of CheckBox controls in which a check mark is mysteriously applied to other items within the ListView when the page containing the ListView has navigation returned to it. Specifically, I apply check marks to some items within the ListView that contains roughly 300 items. I then tap a Button that invokes another app to launch, and then when I return back to my original app with the ListView and scroll down the ListView , I observe a pattern of mysteriously checked checkboxes

how to copy numbers from camera lenses and put this copy in another app?

血红的双手。 提交于 2019-12-13 11:16:57
问题 my problem that I want to make an app read numbers from camera lenses we return a copy to my app. like you have a number on piece of paper I want to open my app and it will open camera lenses and read this number by camera lenses and return me a copy of that number to my app 回答1: Optical Character Recognition can be done through Windows Phone using the Microsoft OCR Library for Windows Runtime: http://blogs.windows.com/buildingapps/2014/09/18/microsoft-ocr-library-for-windows-runtime/. Here's

Windows Phone 8.1 BitmapDecoder async/await not stepping through the entire function

北城余情 提交于 2019-12-13 10:31:42
问题 This is a follow up to an answer to a question I had previously posted here. I put the suggested answer into an async function: public static async Task<int[]> bitmapToIntArray(Image bitmapImage) { string fileName = "/Images/flowers.jpg"; StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName); IRandomAccessStream stream = await file.OpenAsync(FileAccessMode.Read); BitmapDecoder decoder = await BitmapDecoder.CreateAsync(stream); var pixelData = await decoder