FAQ Database Discussion Community


Windows Phone local toast notification Text wrapping and image is not showing

c#,windows-phone-8,windows-phone,windows-phone-8.1,toast
In my application, sending toast notification from the application itself. ToastTemplateType toastTemplateXml = ToastTemplateType.ToastText03; XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplateXml); XmlNodeList toastTextAttributes = toastXml.GetElementsByTagName("text"); toastTextAttributes[0].InnerText = "Welcome to My app! Let us know how you heared about us."; string text = DateTime.Now.ToString("MM-dd-yyyy hh:mm:ss", CultureInfo.InvariantCulture); toastTextAttributes[1].InnerText = text; ToastNotification...

Windows Phone 8.1 - HttpClient SendRequestAsync will never return with a response

c#,.net,windows-phone-8.1,async-await
i am trying to receive a response from a HttpClient in Windows Phone 8.1 but it hangs on the method: httpClient.SendRequestAsync(requestMessage); The code looks like this: // Create a client var httpClient = new HttpClient(); // Add a new Request Message var requestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri(serviceUri)); // Add...

Could not load file or assembly 'WinRTXamlToolkit'

c#,.net,windows-runtime,windows-phone-8.1,winrt-xaml-toolkit
I want to use some charts in my Windows Phone 8.1 application. So, following this tutorial I have done the following: I have installed the following packages: I have the following XAML: <Page xmlns:Charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting" x:Class="MST_61462004_E3T02.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MST_61462004_E3T02" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"...

Stream.CopyTo(newStream) return Length 0

audio,windows-phone-8.1,memorystream
I try to make some concatenation of buffers which are saved in a memory streams. Then, when I'm trying to play the whole buffer it gives an exception: An exception of type 'System.ArgumentException' occurred in Microsoft.Xna.Framework.ni.dll but was not handled in user code Additional information: Ensure that the buffer length...

ScrollViewer ChangeView on SizeChanged

c#,wpf,xaml,windows-phone-8.1
I have DataTemplate which I use in HubSection: <DataTemplate x:Name="dataTemplate2"> <Grid x:Name="greedy"> <ScrollViewer x:Name="scroller" SizeChanged="ScrollViewer_SizeChanged" Height="{Binding Height,ElementName=greedy}" > <ItemsControl x:Name="itemsControl" ItemsSource="{Binding}" ItemTemplate="{StaticResource dataTemplateDetails}"> <ItemsControl.ItemContainerTransitions> <TransitionCollection> <ReorderThemeTransition /> <NavigationThemeTransition />...

LongListMultiSelector equivalent in windows phone 8.1 universal app

c#,windows-phone-8.1,win-universal-app
What is the equivalent of the LongListMultiSelector in windows phone when created as a universal app? All I want to do is provide checkboxes when I tap on the left inside of a list but I can't figure out to do it. I've tried using the ListView, but that either...

Google GCM with Windows Phone 8.1

android,push-notification,windows-phone-8.1
I am going through various options for Push-Notification service use in Android and Windows Phone 8.1 app. The datapack-size for gcm-push is 4 KB and is ample for my needs and it's also free. Is there any way, GCM be used with Windows Phone 8.1 i.e in the client side...

Windows phone 8.1 universal app create .appx file but not work in nokia lumia 720 device

windows-phone-8.1
I am developing windows phone application. I am having problem on deploying my project. Error -Deployment failed because no windows phone was detected. Make sure a phone is connected and powered on. But my phone already detected and power also ON . i have register my windows phone for developer...

Wrong coordinate points bing maps

c#,xaml,windows-phone-8.1,bing-maps
I trying to cut the map to many rectangle parts and show ellipse in center like this: But the result is this: XAML: <Maps:MapControl x:Name="BingMap" Loaded="BingMap_Loaded"> <Maps:MapItemsControl x:Name="MapPins"> <Maps:MapItemsControl.ItemTemplate> <DataTemplate> <Grid> <Ellipse Fill="Red" Width="20" Height="20"></Ellipse> <TextBlock Maps:MapControl.Location="{Binding Point}" Text="{Binding Count}" FontSize="20" Margin="5"/> </Grid> </DataTemplate>...

Receiving shared content using windows phone 8.0

c#,windows-phone-8,windows-phone-8.1,windows-phone-8-emulator
I am working on windows phone application 8.0 not 8.1 I want to receive shared file into my application For E.g : I found some code that will allow register file type to be shared with application but no luck .. I just want to know is that possible to...

How to update a secondary tiles in windows phone 8.1 using database

c#,windows-phone-8.1
I need to update a secondary tile. I am using sqlite database used to store some data. I've searched internet over this issues, I got only one solution as XML schema. But I need to update secondary tiles via database query. So Is it possible to update it or not....

ListView fill the width of parent, screen or whatever [duplicate]

wpf,layout,windows-phone-8.1
This question already has an answer here: ListViewItem won't stretch to the width of a ListView 1 answer I am trying to display some data from an Observable Collection to a ListView. Binding is working fine. My only problem I cannot fix is the layout of the ListView.I use...

Visual Studio 2013 Compiler issue on Windows phone 8.1 silverlight project

visual-studio,debugging,visual-studio-2013,windows-phone-8.1
Today I tried to make a windows phone application, I first stared with universal application and and it worked, emulator was running with project but when I try to use Windows.Phone.Speech namespace I couldn't do that, thus I make some research for it, Then I find the answer I need...

Windows Phone 8.1 : how to Launch an Installed app From My app

c#,windows-phone-7,windows-phone-8,windows-phone-8.1
I have tried the following links How do I launch other app from my own app in Windows Phone 8.1? Call an external app on windows phone 8.1 runtime(not silverlight) xaml c# application but nothing is working for me as i simply wants to launch one app for e.g. angry...

How to set “ApplicationID” on LoginButton control? (Facebook SDK .Net)

c#,xaml,user-controls,windows-phone-8.1,facebook-c#-sdk
I'm following the login tutorial on facebooksdk.net to implement their login button user control, but after referencing the library and adding the LoginButton I can't find a ApplicationId property as shown in the tutorial. To debug this, I've searched through the properties available and tried referencing both namespaces, but each...

How to apply layout constraints to in windows phone 8.1?

layout,windows-phone-8.1
How can I apply layout constraints to layout so that it auto adjusts it self for every device like we apply in iOS? The app I developed leaves blank spaces when I run it on higher size devices.

Windows Phone 8.1 get image from base64 string

c#,image,windows-phone-8.1
How can i get an Image from a base64 string on Windows Phone 8.1? I know how to decode the image if that helps? var imageBytes = Convert.FromBase64String(base64StringWithImageData); var ms = new MemoryStream(imageBytes, 0, imageBytes.Length); var decoder = await BitmapDecoder.CreateAsync(BitmapDecoder.PngDecoderId, ms.AsRandomAccessStream()); But nowhere have i found how i can get...

Set content of particular Pivot Item

c#,linq,windows-phone,windows-phone-8.1
I wrote a Windows Phone 8.1 (WINPRT) App. It contains Pivot, in which pivot items are generated dynamically according to JSON. For example, when I open Clothing Category Page,>> Summer Wear,Winter Wear etc pivot items are generated dynamically. Now I am clicking the button to load more items in GridView...

How do I access MainPage class non-static members from the App class?

c#,wpf,xaml,silverlight,windows-phone-8.1
I have added an application bar to my blank Windows Phone 8.1 Silverlight app as per MSDN documentation https://msdn.microsoft.com/en-us/library/windows/apps/hh394038(v=vs.105).aspx. I have added event handlers encapsulated within the App class to each of the buttons in the application bar. I need a way of accessing the current instance of MainPage class...

Convert number to string using Hebrew letters

c#,windows,windows-phone,windows-phone-8.1,globalization
This is probably an easy one (it may even be a dupe), but I cannot find answer to this - how to print number using Hebrew letters? I've tried to change app language and/or using format provider: myTextBox.Text = 555.ToString(new System.Globalization.CultureInfo("he-IL")); but I can't get Hebrew letters. ...

How can I get a list from a json file in c#? [closed]

c#,json,windows-phone-8.1,json.net
I am trying to display a list pulled from the eztv.re API in a listbox. I have tried using: using (HttpClient client = new HttpClient()) { using (HttpResponseMessage response = await client.GetAsync(("http://eztvapi.re/shows/1&query_term=" + SearchTextBox.Text))) { using (Stream stream = response.Content.ReadAsStreamAsync().Result) { using (StreamReader reader = new StreamReader(stream)) { string json...

How to get the device orientation changed event under Windows Phone

c#,xaml,windows-phone,windows-phone-8.1
With windows phone, is there an event I can register for when the device entered landscape mode? The reason why I am asking this is because we have a view with an input box. And when in landscape mode, the TextBox is partially blocked by the keyboard. So I am...

Windows Phone 8.1 XAML - Overriding ResourceDictionary entry

c#,xaml,windows-phone,windows-phone-8.1
I'm using a library (https://qkit.codeplex.com/) to implement a JumpList on my app and I wish to override its default margin for group header elements. This margin is defined on the library code as a resource in a resource dictionary: <Thickness x:Key="JumpListHeaderItemMargin">19,0,0,9.5</Thickness> How do I override the value for this key...

Downloading a .JSON file in WP8.1

c#,json,download,windows-phone-8.1,httpwebrequest
For the moment, I have this code: string uri = "http://yts.to/api/v2/list_movies.json?limit=20&page=1"; var webRequest = (HttpWebRequest)WebRequest.Create(uri); webRequest.Method = "GET"; var webResponse = (HttpWebResponse)webRequest.GetResponse(); if ((webResponse.StatusCode == HttpStatusCode.OK) && (webResponse.ContentLength > 0)) { var root = JsonConvert.DeserializeObject<RootObject>("/list_movies.json"); var articles = root.data.movies.Select(m => new Article { Name = m.title, ImagePath = m.medium_cover_image, Year...

How do you calculate pixel size of string?

c#,windows-phone-8.1,windows-8.1,windows-universal
I have a string. I know the font family and the font size it is going to be displayed in. I need to know how many pixels the text will take up in the ui. So that I can determine whether to show another element. How would I do that?...

How to bind a textblock visibility to another textblock text property

c#,xaml,windows-phone-8,windows-phone-8.1,winrt-xaml
<Grid Height="{Binding ElementName=oldPrice, Path=Height}"> <TextBlock VerticalAlignment="Bottom" FontSize="{StaticResource TextStyleSmallFontSize}" RequestedTheme="Light" FontWeight="Bold" Foreground="#B0B0B0" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"> <Run x:Name="oldPrice" Text="{Binding oldPrice}" /> </TextBlock> <Line Stretch="Fill" Stroke="#B0B0B0" StrokeThickness="1" X1="1" Width="{Binding ElementName=oldPrice, Path=Width}" Height="{Binding ElementName=oldPrice,...

Background task spontaneous completion с#

c#,windows-runtime,windows-phone-8.1,background-process,background-task
Register a background task: string myTaskName = "Task"; foreach (var cur in BackgroundTaskRegistration.AllTasks) if (cur.Value.Name == myTaskName) { return; } await BackgroundExecutionManager.RequestAccessAsync(); BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder { Name = "Task", TaskEntryPoint = "Background.Task" }; taskBuilder.SetTrigger(new TimeTrigger(15, true)); BackgroundTaskRegistration myFirstTask = taskBuilder.Register(); Background task is created in the Windows Runtime...

Format date shown on DatePicker

date,datepicker,windows-phone-8.1,format
I created a Pivot Project on Visual Studio 2013. I created the following control: <DatePicker Header="Data" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" Width="341"/> When I tap on it on my phone, it displays the date as M/D/Y. Is it possible to display it as D/M/Y? Also, don't know if I should create another...

Ad added in DevCenter not visible in PubCenter, how to track?

windows-phone,windows-phone-8.1,windows-phone-store
Previously I was creating ad units in pubCenter and it worked fine. But this time I decided to do it in DevCenter. My app is already published. It has an adControl with proper app ID and ad unit ID. However no ad is showing up. But it's ok, I'll wait...

What is: Bad_dump!missing_teb (Windows Phone Dev Center Crash Log)

crash,windows-phone-8.1,out-of-memory,crash-reports,crash-dumps
The following 2 crashes are being reported as our WP 8.1 app's highest occurance crashes based on Window's developer center's crash logs. Any clue what they mean or how to debug them? I suspect 'out of memory' but would like to confirm. First: bad_dump!missing_teb BAD_DUMP_MISSING_MEMORY_MISSING_CLR_METADATA_bad_dump!missing_teb Second: bad_dump!missing_teb BAD_DUMP_MISSING_MEMORY_NULL_CLASS_PTR_READ_ZEROED_STACK_MISSING_CLR_METADATA_bad_dump!missing_teb ...

How to use existing camera app(not create one using MediaCapture) and take picture in windows phone 8.1(WinRT)?

c#,camera,windows-runtime,windows-phone-8.1
I know how to implement a camera capture using a MediaCapture in windows phone 8.1. But the question is can't we just launch the existing camera app using a launchUriAsync() and get back the path of the file or the file itself in the form of an argument? Example: Like...

WP 8.1 - How to save an image to Isolated Storage if know it's URL

c#,image,windows-phone,windows-phone-8.1,isolatedstorage
I have the image URL. How can I save it into Isolated Storage in WP 8.1. Can I trigger both save it and then share it onto Facebook with only one button? This is my code - which work well following Burak Kaan Köse's: public async void GetImage() { StorageFolder...

Automapper starting exception in Windows 8.1 Unified project

c#,.net,windows-phone-8.1,automapper,mvvmcross
I have a cross-platform project, using mvvmcross and stuff. Right now, solution consists of Core and Windows Phone projects. Core contains AutoMapper reference, and WP project contains AutoMapper and AutoMapper.WPA references. Application works fine in most cases, but sometimes it throws exceptions like Could not load file or assembly 'AutoMapper.Net4'....

Back button closing app instead of going back on Windows Phone 8.1

vb.net,xaml,windows-phone-8.1
I've created a simple Windows Phone 8.1 app in Visual Studio 2013 and added 2 Basic Pages, along with some code to navigate to the second screen when a button on the first screen is clicked. Going to the second screen works fine, but when the hardware Back button is...

How to apply a style of a Button dynamically in WP 8.1?

c#,.net,xaml,mvvm,windows-phone-8.1
I have one WP 8.1 apps. I am following a complete MVVM design pattern. In the XAML code <Grid> <Canvas x:Name="gameCanvas" Width="{Binding CanvasWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <ItemsControl ItemsSource="{Binding Path=ButtonItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <ItemsControl.ItemTemplate> <DataTemplate x:Name="Dta"> <Button x:Name="newsItemBtn" Height="{Binding Height}" Width="{Binding Width}" Style="{StaticResource ButtonStyle2}" Content="{Binding...

RadioButtons binding on Windows Phone 8.1

c#,xaml,mvvm,radio-button,windows-phone-8.1
I have some problem with binding my RadioButton property IsChecked. I have two RadioButton's on the grid, which Visibility binded to a property on my viewmodel. What i want to achieve is to always setting first RadioButton to Checked state, when grid is become visible. Here is some code: <Grid...

seperating asynchronous HttpClient and Ui thread Winrt?

c#,windows-runtime,windows-phone-8.1
I am trying download json data from a rest service and all i'm doing is for a button click navigating to a new page and in the new page i'm using async methods to download data. But still the UI gets stuck ... the ui get's stuck in the first...

Unable to resolve property '%1' while processing properties for Uid '%0'

c#,windows-runtime,windows-store-apps,windows-phone-8.1,windows-8.1
I'm trying to localize my WP 8.1 app. Here is a part of Strings/en-us/Resources.resw: <data name="SampleProperty.Text" xml:space="preserve"> <value>Sample text</value> </data> <data name="SampleProperty.SomeRandomKey" xml:space="preserve"> <value>SAMPLE TEXT</value> </data> Also one of application pages contains the following code: <TextBlock x:Uid="SampleProperty" /> But the app throws an exception in process of navigation to that...

Windows Phone 8.1 WinJS Appbar disabled property not working

javascript,html,windows-phone-8.1,winjs
I'm trying to hide (disable) the appBar so it doesn't show on up a page in my app. However the disabled property doesn't seem to be working, or my syntax is off. I've tried using it like: <script> var disabled = appBar.disabled; appBar.disabled = disabled; </script> and <script> var disabled...

ResolutionScale vs RawPixelsPerViewPixel on Windows Phone 8.1

windows-phone-8.1,winrt-xaml,windows-8.1
I'm currently working on a universal Windows 8.1 / Windows Phone 8.1 application, and am trying to make sense of the various types of display information that's being presented to me. For Windows Phone, we have access to two different properties in the DisplayInformationClass: ResolutionScale RawPixelsPerViewPixels ResolutionScale seems to only...

unable to add reference to windows.media.speechsynthesis.dll

windows-phone-8.1,text-to-speech,system.windows.media
I am working on text to speech conversion in windows 8.1 (silverlight) and i need to access the SynthesizeTextToStreamAsync method for which I need to add reference to Windows.media.speechSynthesis. I am unable to add this reference to my project it shows me error message as A reference to a higher...

Control style of each individual ToggleButton in Windows Phone 8.1

windows-phone-8.1,controltemplate,togglebutton
I am building a Windows Phone 8.1 (non SilverLight) application. I want my ToggleButtons to look different when toggled, so I have the following code: <Page.Resources> <!-- Custom style for Windows.UI.Xaml.Controls.Primitives.ToggleButton --> <Style TargetType="ToggleButton"> <Setter Property="Background" Value="{ThemeResource ToggleButtonBackgroundThemeBrush}" /> <Setter Property="Foreground" Value="{ThemeResource ToggleButtonForegroundThemeBrush}"/> <Setter Property="BorderBrush" Value="{ThemeResource...

navigating between pages using radio buttons in winrt

c#,windows-runtime,windows-phone-8.1,windows-8.1
i'm trying to navigate between pages while toggling the radio buttons like the tab control. i've tries a few ways.Here they are first the xaml <StackPanel> <RadioButton Content="navigateto1" Checked="RadioButton_Checked"/> <RadioButton Content="navigateto2" Checked="RadioButton_Checked_1"/> <Frame x:Name="contentframe"> </Frame> </StackPanel> then the code behind private void RadioButton_Checked( object sender, RoutedEventArgs e ) { var...

Convert windows phone 8.1 app to android and IOS [closed]

c#,android,ios,windows-phone-8.1,windows-universal
Can anyone tell me, how can I convert my windows phone 8.1 (universal) app to Android or IOS? is this possible? without using Xamarin. thanks

Windows Phone page navigation does not work

c#,.net,navigation,windows-phone-8.1
I'm new in creating apps for Windows Phone. I've got problem with redirecting to another page. I've created blank page with HyperlinkButtonand in .cs file I wrote this: private void but_elf_Click(object sender, RoutedEventArgs e) { this.Frame.Navigate(typeof(Elfy)); } In xaml: <HyperlinkButton x:Name="but_elf" Content="Elfy" HorizontalAlignment="Center" Margin="100,125,100,255" Grid.Row="1" VerticalAlignment="Center" Width="200" Height="70" /> When...

MVVM How to set datacontext when viewmodel uses async

c#,asynchronous,mvvm,windows-phone-8.1
After hours of searching I am still without answer to this question. I have read this nice writing about async MVVM and made my viewmodel to use factory method. public class MainViewModel { public MainViewModel() { } private async Task InitializeAsync() { await DoSomethingAsync(); } public static async Task<MainViewModel> CreateAsync()...

Error when serialize List

c#,serialization,windows-runtime,windows-phone-8.1
A am developing a Windows Phone Runtime application and a I have data in a string list. But when I suspend my app the error occurs Error trying to serialize the value to be written to the application data store and Additional information: Data of this type is not supported....

BooleanToVisibilityConverter works on Textblock and not on UserControl

wpf,xaml,binding,windows-phone-8.1
I'm working on a windows phone project. There is something i don't really understand about my xaml. Here it is: <Page x:Class="CitiBox.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:converters="using:CitiBox.Converters" xmlns:views="using:CitiBox.Views" mc:Ignorable="d" Background="{ThemeResource...

changing image background in button does not work

c#,windows-phone-8.1,.net-4.5
I want to toggle button's image on each click. My code looks like this: private void k1_Click(object sender, RoutedEventArgs e) { bk1 = !bk1; k1.Content = bk1.ToString(); var uriString = bk1 ? @"Assets/image1.png" : @"Assets/image2.png"; k1.Background = new ImageBrush { ImageSource = new BitmapImage(new Uri(uriString, UriKind.Relative)) }; } When I...

how to display a different image in the DataTemplate?

c#,xaml,windows-phone-8.1
In a DataTemplate of a ListView I have this code <Image Grid.Column = "1" Grid.ColumnSpan = "2" Grid.Row = "0" Source = "{Binding Picture}" VerticalAlignment = "center" /> I'm a Binding with the Picture property. This property is a string with an address to an image on the web. How...

ItemsWrapGrid Order in Windows Phone 8.1

c#,xaml,listview,windows-phone-8.1
I have the following sample data setup in my XAML: <vm:SoundModel.Animals> <vm:SoundGroup Title="Animals"> <vm:SoundGroup.Items> <vm:SoundData Title="Animal 1" FilePath="Animal1.wav" /> <vm:SoundData Title="Animal 2" FilePath="Animal2.wav" /> <vm:SoundData Title="Animal 3" FilePath="Animal3.wav" /> </vm:SoundGroup.Items> </vm:SoundGroup> </vm:SoundModel.Animals> And in my XAML I have the following: <Page.Resources> <DataTemplate x:Key="SoundTileDataTemplate"> <Grid...

Beacons in Windows Phone 8.1 - there are no possibilities?

c#,bluetooth,windows-phone-8.1,bluetooth-lowenergy,ibeacon
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...

Deploy enterprise (in-house) application on windows phone without developer unlocking the phone?

windows-phone-8,deployment,windows-phone-8.1,enterprise
As the title says, I would like to deploy my application on multiple phones, without developer unlocking them. The said application is private, thus it can't be distributed through the store. I've heard of Company app distribution, however it's not clear for me whether it requires a developer unlocked phone...

Windows phone Store app Font size Issue

fonts,windows-runtime,windows-store-apps,windows-phone-8.1,font-size
I have created windows phone 8.1 Store app. I have change setting: setting->ease of access->Text size to MAX Now if I launch my app all fonts are disturbed to too larger font sizes, which was not happening in earlier silverlight apps Is there any way to create app irrespective of...

How to split text with HTML tags to array

c#,windows-phone-8.1,windows-8.1,windows-universal
I have very simple text with HTML (only <b> tag) e.g. Lorem Ipsum is <b>simply dummy</b> text of the printing and <b>typesetting industry</b> I would like to split the text to array like this: [0] - Lorem Ipsum is [1] - <b>simply dummy</b> [2] - text of the printing and...

Can't create Windows Phone appx bundle from Cordova project

cordova,windows-phone,windows-phone-8.1,visual-studio-cordova,windows-phone-store
I need to create an appxbundle file for Windows Phone Store but unfortunately, the Visual Studio 2015 RC Cordova Tools build only appxupload with appx file. The Cordova version is 5.0.0. I've found two workarounds from this post. Unfortunately, none of them is working. The first one 1.) Another way...

windows phone 8.1 universal app : clear cookies

c#,windows-phone-8,cookies,windows-phone-8.1,webbrowser-control
I am developing windows phone 8.1 universal app and i wish to clear cookies from browsers. I have used windows.phone.controls namespace and used following code await new WebBrowser().ClearCookiesAsync(); but it says that it throws several error. Please help windows programmers . I think the above code works well for silverlight...

Windows 10 FIle query issues

c#,windows-phone,windows-phone-8.1,windows-8.1,windows-10
I am trying to follow the instructions to get files from the knownfolders in windows 10 as shown below, https://msdn.microsoft.com/en-us/library/windows/apps/br227275.aspx try { StorageFolder folder = KnownFolders.PicturesLibrary; IReadOnlyList<StorageFile> pics = await folder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByDate, 0, 20); Debug.WriteLine(pics.Count); } catch(Exception ex) { Debug.WriteLine(ex.Message); } The same code works in WindowsPhone 8.1 SDK. But on...

data binding property of a other control to a style while animating it

c#,windows-runtime,windows-phone-8.1
i'm trying to implement a tab style radio button. this style contains a textblock as a child of a grid which changes it's color when checked and the grid is a child of border element. i'm trying to bind the grid's background only when it is in checked state but...

Background thread in Windows Phone 8.1 app

c#,multithreading,networking,windows-runtime,windows-phone-8.1
I'm working on a Windows Phone 8.1 shopping application. I have a continously running thread in the app which downloads the users basket and saves it in a local cache to imporve performance. So far what I have is something like this: while(UserLoggedIn) { await Networking.getBasket(); await Task.Delay(5000); } This...

How to set ItemsSource value of ColumnSeries?

c#,.net,windows-runtime,windows-phone-8.1,winrt-xaml-toolkit
I am not able to set ItemsSource value of ColumnSeries. I am following some examples (this and this) but they seem to be out dated. Here is my XAML: <Charting:Chart x:Name="ColumnChart" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Height="Auto"> <Charting:ColumnSeries Title="Georgi Kyuchukov" Margin="0" Name="ColumnChartSeries" IndependentValuePath="Name" DependentValuePath="Pts" IsSelectionEnabled="True" /> </Charting:Chart> and here is my C#...

How to rotate labels of WinRTXamlToolkit column chart?

c#,.net,windows-runtime,windows-phone-8.1,winrt-xaml-toolkit
I have the following XAML definition: <Charting:Chart x:Name="ColumnChart" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Height="Auto" Padding="50" Title="100 random numbers"> <Charting:ColumnSeries Title="Skills" IndependentValuePath="Name" DependentValuePath="Pts" IsSelectionEnabled="True"> </Charting:ColumnSeries> </Charting:Chart> How can I rotate the labels (let's say on -90 degrees) in order to make them more readable? ...

OpenGLES in a Windows Phone 8.1 App

c#,c++,opengl-es,windows-phone-8.1
I have a C++ lib that draws visual controls on a drawing context using OpenGLES (like buttons, textboxes, lists etc.). I want to use this lib on multiple mobile devices (Windows Phone 8.1, IoS, Android). Right now I want to try to use it on a Windows Phone, so I...

windows phone: deserialise and store both json key and value to modal

c#,windows-phone-8,windows-7,windows-phone-8.1,json-deserialization
Hello guyzzzz i want to store both key and value in modal class...below is my json.. { "Example": [ { "Invoice": { "TFDGFF": " 200", "BF": " 200", "MD": "10", "EFM": " 12", "ATT": "4" }, "TF": "200" }, { "Invoice": { "DF": " 49", "DR": " 49", "KJ": "4",...

Add ListBox to DataTemplate from C# code

c#,.net,windows-phone-8.1
I am trying to add HubSections dynamically (C# code) - that works. Then from the same code I want to add ListBoxes to each of 'em - and apparently I have no idea how to do that. I found several examples like adding: ContentTemplate = new DataTemplate() { VisualTree =...

Unable to cast object of type 'Windows.UI.Xaml.Controls.Canvas' to type 'Canvas'

c#,wpf,canvas,windows-runtime,windows-phone-8.1
I have a canvas and want to get its name when it is Tapped. So, I have this XAML: <Canvas Name="drawLine" ... > ... </Canvas> and this function bind on Tapped event: private void ChangePage(object sender, TappedRoutedEventArgs e) { string name = ((Canvas)sender).Name.ToString(); Frame.Navigate(typeof(Params), name); } bug get the following...

Why can't I use the Windows.Phone.Media.Capture namespace?

c#,windows,visual-studio,windows-phone,windows-phone-8.1
I'm attempting to use the AudioVideoCaptureDevice namespace in my application however I can't seem to locate the namespace. My guess is that I'm missing an assembly reference but I'm unsure if this should be required. I'm using Visual Studio 2015 and building against the Windows Phone 8.1 SDK. ...

Windows Phone 8.1 Showing progress view until async/await task finishes

c#,asynchronous,windows-phone-8.1,win-universal-app
I have two tasks which download an mp3 from web address inside local storage and returns timeSpan. public async Task<TimeSpan> filedownload_Ignition_Outside() { Uri sourceIgnition_Outside = new Uri(TemporaryAddress.download_playCarSound+"Ignition_Outside"); //download and store file return duration_Ignition_Outside; } public async Task<TimeSpan> filedownload_Idle_Outside() { Uri sourceIdle_Outside = new Uri(TemporaryAddress.download_playCarSound +"Idle_Outside"); StorageFile destinationFileIdle_Outside; //download and store...

DataTable in Windows phone 8.1

c#,.net,windows-phone-8.1
I'm developing a app in win phone 8.1, I need use the DataTable class to pass the data, but this class doesn't exist The references are fine, the directive using for generate not displayed. Thanks....

ViewModel Called on Navigation Back Prism MVVM Windows Phone 8.1 C#

c#,xaml,mvvm,windows-phone-8.1,prism
I'm working on an application and everything works fine but when I go back to the previous page the View Model is called so it will not maintain the old data. I use this line to call My View Model in XAML. prismmvvm:ViewModelLocator.AutoWireViewModel="true" So my question is: How do I...

Local settings in Windows Phone 8.1 app are not stored

c#,windows-runtime,windows-phone-8.1,winrt-xaml
I have created many apps for Windows Phone 7 and 8. To store settings I was using these methods: IsolatedStorageSettings.ApplicationSettings["key"] = value; IsolatedStorageSettings.ApplicationSettings.Save(); Everything worked perfectly, my settings were stored. Save() method did the job. But now I am creating an app for Windows Phone 8.1 (WinRT). I have followed...

Windows Phone 8.1 : Add remote Image to BottomAppBar or AppBarButton

c#,xaml,windows-phone-8,windows-phone-8.1,windows-phone-7.1
I want to add remote Image into app bar button. My image is this url http://2.bp.blogspot.com/-yEbb9_qp-jg/U8-KGeZAy3I/AAAAAAAAB0U/m91Bv1jPAQI/s1600/india+win+at+lords.jpg and I want to bind it to appbarbutton from the backend. my backend code is propic.UriSource = new Uri("http://2.bp.blogspot.com/-yEbb9_qp-jg/U8-KGeZAy3I/AAAAAAAAB0U/m91Bv1jPAQI/s1600/india+win+at+lords.jpg"); But my backend code is not working...someone please tell me how to do it And...

How to change mediaelement to scale in portrait and fullscreen in landscape mode on Windows Phone 8.1?

c#,.net,xaml,windows-phone-8.1
I am having difficulty trying to change the <mediaelement /> to fullscreen automatically when the phone is rotated in landscape mode. Right now, the video will play fullscreen when I tap the lower right button that scales to full screen when I tap on it, but I don't want that....

windows phone 8.1: Hide stackpanel if textblock is empty

c#,xaml,windows-phone-8,windows-phone-8.1,visualstatemanager
my xaml code is given below my whole xaml <Page x:Class="App13.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App13" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:converter="using:App13" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Page.Resources>...

WP8.1 Calendar look-alike

calendar,windows-phone-8.1
I'm searching for a WindowsPhone 8.1 Calendar look-alike. I don't want to store any data/appointments in it, I just want the monthly view as a date-picker control, as I do not like the normal date-picker. I came across WinRTXamlToolkit that does offer a calendar, but I don't like the style...

Set parameter to notification

c#,windows-phone-8.1,windows-universal
I'm using C# and Windows Phone 8.1 as Universal app. I can send notifications from background by this code: void ShowNotification(string title, string text) { ToastTemplateType toastTemplate = ToastTemplateType.ToastText02; XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate); XmlNodeList textElements = toastXml.GetElementsByTagName("text"); textElements[0].AppendChild(toastXml.CreateTextNode(title)); textElements[1].AppendChild(toastXml.CreateTextNode(text));...

play audio periodically from a memory stream c#

c#,audio,windows-phone-8.1,memorystream
I have some buffer containing samples of sinus which I want to be played from a memory stream periodically. Is there any efficient way to play it without having gaps in time? I try to make my own signal generator (I know that are some libraries providing that but I...

How to create multiple secondary tiles for Windows Phone 8.1

c#,windows-phone-8.1
I would like to create multiple tiles. I have the ID one secondary tile. public const string appbarTileId = "MySecondaryTile"; How can I use that ID and create multiple tiles?...

Windows Phone UI defaults to 19 margin on the left

windows-phone-8,windows-phone-8.1,guidelines
I've noticed that all guidelines, guides and blogs explain that the standard margin on the left (leading) for Windows Phone is 12. Yet, when I go File > New Project in VS2013 for any type of Windows Phone app, I'm met with a margin of 19, which looks really good....

Slider progress bar with MediaElement Windows Phone 8.1

c#,xaml,slider,windows-phone-8.1,mediaelement
I am working within a Windows Phone 8.1 (non SilverLight) application. I have a MediaElement AudioPlayer that plays audio files. I also have a Slider AudioPlayerSeek that I want 'hooked' to the MediaElement, so that it moves as the audio is playing. I have gone through this tutorial word for...

How can I create a simple text file on a windows phone (8.1) that can be accessed trough USB cable?

c#,file,windows-phone-8,windows-phone,windows-phone-8.1
So as title states, I would like to create a simple text file, that I could write to from my C# application, and copy it to my PC trough an USB cable. Just to be clear, I would like to write a file to this place, because I can access...

Is there a Popup class in the SDK for WP8.1?

windows-phone-8.1
Is there a Popup class (or similar) in the SDK for Windows Phone 8.1? System.Windows.Controls.Primitives.Popup doesn't exist since System.Windows.Controls. isn't available. Of course MessageDialog and PopupMenu, are available, but none of them seem to have a default behavior of dismissable information with no buttons (and maybe even non-modal). Must I...

Gapless looping in Background Media Player for Windows Phone 8.1

c#,windows-runtime,windows-phone,windows-phone-8.1
I'm creating an app (Windows Runtime) that requires sound to run in the background (even when the phone is locked) so I set the BackgroundMediaPlayer's isLoopingEnabled property to true in the background task but when I play back the audio in the app there is about a 1 second gap...

Single sign on single native client windows phone using ADAL

windows-phone-8.1,single-sign-on,adal
We have a windows phone native app (and building for android, iOS also) which uses ADAL to get token for ex:graph. ADAL is asking for credentials for the first time. Now inside of this native app on some frame we have a WebView control which launches another website (our own)...

Get type programmatically and use it as a typeparam

c#,windows-phone-8.1,windows-universal,type-parameter
What I want to do is read everything that is in my lex.db database. Preferably by paged with pages of a pre-defined size. I have done the following: DbInstance database = GetDatabase(); var tables = database.AllTables(); foreach (var table in tables) { string str = table.ToString(); str = str.Replace("Lex.Db.DbTable`1[", string.Empty);...

c# Windows Phone cannot find json file

c#,.net,windows-phone-8.1,storagefolder
I'm trying to read data from json file in .NET 4.5 for Windows Phone app. After pressing button the exception appears saying: System.IO.FileNotFoundException (Exception from HRESULT: 0x80070002) My code: public static async Task ReadFile() { StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation; if (local != null) { var file = await local.OpenStreamForReadAsync("bazaDanych.json"); using...

Windows Phone App crashes after Launcher.LaunchFileAsync when downloaded from store

windows-phone,windows-phone-8.1,windows-phone-store
I have a strange problem, if I deploy my app through visual studio as debug or release version all is working well. But if I publish it to the store and download it from there the app crashes after Launcher.LaunchFileAsync or FileOpenPicker. When my app launches for example the default...

About Camera UI in window phone 8.1

c#,windows-runtime,windows-phone-8.1,win-universal-app
How to access to Standard Camera Capture UI from code in winphone 8.1? I tried FileOpenPicker to open Picture Library (added button to access camera on navigation bar). Is there any another way to access Camera Capture UI than using FileOpenPicker, for example- custom UI with class MediaCapture or is...

Bing maps for Windows phone app

windows-phone-8.1,bing-maps
I'm trying to build an app for WP8.1 in C#. I want to add the bing maps feature for my windows phone app.

How to build PathGeometry using C#?

c#,wpf,xaml,windows-runtime,windows-phone-8.1
I have the following XAML in Windows Phone 8.1 app running with Windows Runtime: <Canvas Name="drawSplice" Grid.Row="1" Grid.Column="0" Height="80" Width="80" Background="White"> <Path Stroke="Black" StrokeThickness="2" Data="M 10,10 C 10,50 65,10 65,70" /> </Canvas> It gives me the following shape: My question is how to generate such instance of path class using...

WP 8.1 ToggleButton Change Icon when Checked / UnChecked

xaml,windows-phone-8.1,togglebutton
I have the following XAML code for Windows Phone 8.1 (non SilverLight): <Grid> <ToggleButton Name="TogBtn" VerticalAlignment="Center" HorizontalAlignment="Center" Checked="ToggleButton_OnChecked"> <SymbolIcon Symbol="play"></SymbolIcon> </ToggleButton> </Grid> The output of the above code is: How can I change the icon to a stop icon when the toggle button is checked and then back to play...

How to hide app bar button in different hub sections windows phone?

c#,xaml,windows-phone-8.1
i am new to c#. as i move on subsection the app bars stays the same only on the 3rd subsection that one button is hidden. please help... HubPage.xaml <CommandBar x:Name="mybar" ClosedDisplayMode="Minimal" > <CommandBar.SecondaryCommands> <AppBarButton Label="setting" Click="AppBarButton_Click"/> </CommandBar.SecondaryCommands> <AppBarButton x:Uid="CALENDAR" Label="calendar" Click="AppBarButton_Click"> <AppBarButton.Icon> <SymbolIcon x:Name="btnCalendar" Symbol="Calendar"/> </AppBarButton.Icon>...

LaunchUriAsync with Authentication and other custom headers

authentication,windows-phone-8.1,single-sign-on
I am new to windows phone development. I have an app and a website and both of them needs authentication. When I launch the website from my app and if the user is already authenticated I want to pass the authentication headers so the user doesn't need to authenticate again...

How to get info about previous page on Frame.GoBack()

c#,navigation,windows-phone-8.1
Say we have some Page PageA and I have a button that, when clicked, does the following: Frame.NavigateTo(typeof(PageB)); After the user is done doing stuff, he navigates back from PageB to PageA calling Frame.GoBack() I want be able to determine that I'm navigating back from PageB I could use: protected...

Ellipsis inside button content Windows Phone

xaml,c#-4.0,windows-phone-8,windows-phone-8.1
is it possible to get ellipsis inside button when content length increase the width of button. I tried editing template but did get much success?

Error - “Pivot” does not exist in the namespace - Windows phone 8.1

c#,windows-phone-8,windows-phone-8.1
I am very new to Windows phone development. recently i am working on a project. i have got some code which uses pivot. but it is showing error as: The name "Pivot" does not exist in the namespace "http://schemas.microsoft.com/winfx/2006/xaml/presentation" How can this be resolved ?...

WinPhone 8.1 | Force xaml layout change

c#,xaml,windows-phone-8.1,win-universal-app
I have a textbox that when the user presses enter, we perform an API call. However during this time I want to update the XAML layout to show a progressbar. However the layout update only takes place after the method has completed meaning that no progress bar is visible while...

how do i get rows and columns dynamically in windows phone app?

windows-phone-8,layout,windows-phone-8.1
In my application i need to design the seat layout arrangement in the form of rows and columns dynamically. Please any one suggest me how to get rows and columns and which view i need to use. this my xaml code <Grid x:Name="grid" Background="White"> <Button HorizontalAlignment="Stretch" Foreground="Black" Margin="23,56,268,527">Text</Button> </Grid> this...

GridView with two columns Win Phone 8.1

xaml,windows-phone-8.1
I am currently learning Windows Phone 8.1 app development. I am going through this Channel 9 series of video tutorials. They are useful but unfortunately are for Windows Phone 8, not 8.1 and so there are some things I can't follow. I am stuck in such a situation. I want...

windows phone 8.1 microphone line in audio streaming

windows-phone-8.1,audio-streaming,microphone
I'm trying to pass some data from one phone to another while the both are connected via the audio jackets(3.5mm) with an appropriate cable. How do I know if my phone can catch data through the 3.5mm audio jacket? I some some posts say that there is no way to...