FAQ Database Discussion Community


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? ...

ListView swipe/slide animation

listview,animation,windows-runtime,winrt-xaml,swipe
I have a ListView control to display items and I want provide a swipe/slide gesture to select an item. I use the GestureRecognizer class to recognize the cross slide gesture but I also want to animate this gesture by moving the seelcted item horizontally. For example, this should look like...

What is the purpose of the LowLag* advanced features in the MediaCapture class?

windows-runtime,media,video-capture,image-capture
I don't see a real difference between the LowLag* features (controlled by LowLagPhotoCapture, LowLagPhotoSequenceCapture and LowLagMediaRecording classes) and the more classic CapturePhoto* and StartRecord*/StopRecord* methods of the MediaCapture class. What are their purpose ? What advantages have they over the classic methods ?...

AccessViolationException in Windows.Media.SpeechSynthesis.SpeechSynthesizer constructor

c#,windows-runtime,windows-store-apps,sapi
My app is getting an AccessViolationException when calling the default constructor of the Windows.Media.SpeechSynthesis.SpeechSynthesizer class. This only happens on one particular machine (so far at least), which is a Surface Pro 3 running Windows 8.1. All other machines with the app installed do not experience this issue. My code is...

How to bind width of child element to width of parent element in WinRT

.net,xaml,binding,windows-runtime
I have a ProgressBar in StackPanel. I want my ProgressBar to have the size of my StackPanel or a bit smaller. I tried Width="{Binding ActualWidth, ElementName=parentElementName}" but this doesn't actually work in WinRT Sample Code <StackPanel Grid.Row="1" Margin="120,15,0,0"> <ProgressBar x:Name="progressBar1" Value="{Binding ProgressPercent}" HorizontalAlignment="Left" IsIndeterminate="False" Maximum="100" Height="10"/> </StackPanel> ...

Exception When Rendering an Image Using Lumia Imaging SDK

windows-runtime,windows-phone-8.1,lumia-imaging-sdk
In my WP8.1 app, I'm trying to crop an image using the Lumia (formerly Nokia) Imaging SDK. the image is retrieved using FileOpenPicker: public async void ContinueFileOpenPicker(Windows.ApplicationModel.Activation.FileOpenPickerContinuationEventArgs args) { if (args.Files.Count > 0) { _stream = await args.Files[0].OpenAsync(Windows.Storage.FileAccessMode.Read); _bitmapImage = new Windows.UI.Xaml.Media.Imaging.BitmapImage(); await _bitmapImage.SetSourceAsync(_stream); SelectedImage.Source = _bitmapImage; } else {...

Progressbar for filling TextBox using MVVM Light Toolkit in WinRT

c#,wpf,xaml,mvvm,windows-runtime
I have a form containing few TextBox elements and a progress bar. I want the progress bar to be updated when the TextBox's have some values assigned. So when a value is set to a TextBox I increment ProgressPercent if the lenght is different from 0; The problem is that...

WinRT control to render XAML UIElement

c#,xaml,windows-runtime,winrt-xaml
I am porting a WPF app into WinRT. The old app had a part where it would take something like an Image, MediaElement, a Xaml Page, etc; cast it as a UIElement; and then the recieving class would use VisualBrush to render it onto a button. Unfortunately WinRT has no...

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...

Errors in Generated Files for WinRT XAML DirectX Universal App

c++,visual-c++,windows-runtime,windows-store-apps,winrt-xaml
I started a project from the DirectX and XAML template and made some small edits to the Direct3D-only portion of the project. Now I get a number of errors in the xamltypeinfo.g.cpp file, stating that the Common::NavigationHelper class doesn't exist. Hovever I can validate that it's definitely a class included...

C# How to change background color of root layout in Windows Phone 8 WinRT

c#,windows-phone-8,colors,background,windows-runtime
I'm trying to change the background color of the main content area in my Windows Phone 8 (WinRT) app. I've tried specifying the color (grey) by adding borders to grids and the main listview. The problem is that I can see the background color change from black to grey when...

How to add Buttons inside of MapControl Windows Phone 8.1

windows-runtime,windows-phone-8.1
I want to put two Buttons in my MapControl, one to zoom in, and other to zoom out, here's my CS file with a code,what i did here i use the MapControl1.ZoomLevel = 15; , but how i can put this inside a button? public async void mapas2() { Geolocator...

How to scroll a ListView bound to a CollectionViewSource to a desired item after it's update

c#,listview,windows-runtime,collectionviewsource
I'am currently developing an WinRT app an need a ListView ordered by date and grouped by day. The ListView is bound to an ICollectionView in my ViewModel public Windows.UI.Xaml.Data.ICollectionView GroupedData { get { return cvSource.View; } } private Windows.UI.Xaml.Data.CollectionViewSource cvSource; In my XAML I can bind then the ListView to...

Force pivot item to preload before it's shown

c#,windows-runtime,windows-phone-8.1,winrt-xaml
I have a Pivot with several PivotItems, one of which contains a canvas that places its items in dynamic locations (depending on the data). I get the data, and I can place the items in their place before the user can choose this item (this isn't the first pivot). However,...

picture capture by using universal app windows phone 8.1 winrt

windows,windows-runtime,windows-phone-8.1
i need to lunch the universal camera app to take a picture and to return the pic to my app, can't use the Photo Chooser Tasks cause it's Unsupported on winrt and i don't want the Media Capture. any idea?

Get an accelerometer's device id(or monitor an accelerometer in the backbround) on WinRT

c#,windows-8,windows-runtime,accelerometer,background-process
I am looking into the method of monitoring accelerometer in the background. We can get the sample for Windows Phone which implements it at MSDN. According to the sample code, it requires the id of an accelerometer. However, there is no property which gets the device ID for WinRT. var...

Adding table header to Listview with DataTemplate in XAML

c#,wpf,xaml,listview,windows-runtime
In my Xaml I'm binding some data from a wcf. I don't know how to add some table headers to the columns. Also the data in the columns is not well aligned, I'm thinking it's because of the ColumnDefinition Width="auto". I want the columns to be aligned like in the...

about wrap text in ContentDialogResult in winphone 8.1 RT

c#,xaml,windows-runtime,windows-phone-8.1
I have long string and show it in ContentDialogResult as var dlg = new ContentDialog() { Title = sTitle, Content = "This is very long string and i want wrap it but it only appear in 1 line on content of ContentDialogResult. Please help me!", PrimaryButtonText = sTextBtnMain, SecondaryButtonText =...

How to animate HubSection when visibility changed in WinRT Hub Control

xaml,animation,windows-runtime,winrt-xaml
I have a HubSection that is dynamically shown/hidden using Visibility Collapsed/Visible during runtime. I would like to animate the HubSection by having it expand and shrink instead of just instantly showing or hiding it. Animations in WinRT tend to be a science, and I haven't found a good method yet....

Remove Combobox winrt flayout heading

combobox,windows-runtime,styles,winrt-xaml
In winrt windows phone app when you have more than 5 items in a combobox, it opens up on a full screen. And on top its written 'Choose an item'. I want to remove this heading from all my combo boxes....

Setting AutoFlash in Windows Phone 8.1/WinRT

c#,windows-runtime,windows-phone-8.1
I'm currently using MediaCapture in a Windows Phone 8.1 app. I have the camera working as required but changing the flash state is proving difficult. As with the default camera app, I'm looking to have three states - Auto, Off and On. The code I'm using is as follows: switch...

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...

Setting x:DeferLoadStrategy in code behind

xaml,windows-runtime,winrt-xaml,windows-universal,windows-10
In Windows 10, we have a new way of deferring xaml rendering by setting x:DeferLoadStrategy="Lazy" in xaml. However, I failed to find any document indicating how to achieve the same thing in code-behind. The reason that I want this is that I need to somehow hide the element completely again...

Getting number of files in StorageFolder

c#,windows-runtime,windows-phone-8.1
I was working with a Windows Phone 8.1(RT) application, I wanted to know how to get the number of files inside a StorageFolder. I know we can use StorageFolder.GetFilesAsync() and then check the count of this list returned. But since this method takes too long and returns all items is...

Interop between C++ classes inside an WinRT component

c#,c++,dll,windows-runtime,interop
Currently iam working on a WinRT dll component using native C++ to render directx and like to use this component in a C# project. The idea is to have one class (for example A) doing the drawing and exposing relevant public methods to WinRT. This is working fine. But now...

Send a key to WebView

c#,xaml,windows-phone-8,windows-runtime,winrt-xaml
Short Version: Is it possible to send a key press event to an embedded WebView in Windows Phone? Long Version: I have a simple HTML5 game hosted on a website and now I want to load it inside a WebSite in a Windows Phone app and then add control keys...

Counting steps between sessions with Microsoft Band

windows-runtime,windows-phone-8.1,microsoft-band
I would like to use a subscription to the Pedometer to keep track of the number of steps the user has taken since my app last connected to the band. I was hoping there would be a way to read the number of steps taken today, like you can in...

Data Binding ObservableCollections with an IoC

c#,windows-runtime,winrt-xaml
I am writing a Universal app targeting Windows 8.1, and am re-writing it to use an IoC container. However, I found something that is puzzling me a bit. Before I used the IoC, I would create an instance of my VM in the code-behind and bind to it, like this:...

How to display UIElement but without UI interactions (to touches, clicks, …)

windows-runtime,winrt-xaml
I would like to add some kind of watermark over a page in my application : The watermark is a UIElement (a Canvas for instance with partial opacity) which is on top of all others controls. And I want it to be "transparent" to any touches/clicks/gestures. As "transparent", I mean...

How to “navigate” to Specifically hub position Windows Phone 8.1

c#,windows-runtime,windows-phone-8.1
I have a hub with 5 positions, and i just want to put a button and when i click,go to Specifically position... In Pivot control i can use SelectedItems with Index Position but here... I don't know <Grid x:Name="MainFragment" > <Hub x:Name="hubMain" Header="Você no mundo, o mundo em você!" Margin="1,0,0,0">...

WinRT Localization - Multiple Translations per Language

windows,localization,windows-runtime,store
I am building a Windows Store application in XAML/C# for a Windows 8.1 Professional environment. My project has a requirement that I must support multiple languages in addition to multiple translations for any given language. For example, I may have a label that would be displayed in English or French,...

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...

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"...

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...

What is the best way to do the long background task in Windows 8

windows-8,windows-runtime,windows-8.1,background-task
I'm developing Windows Metro App and in my App I need to download some information(about 60Mb, every time) from server in background. Download should occur regularly, for example every 8 hours. So I tried to use Background Task, but there are some CPU and network quotas(https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh977051.aspx), and I can't do...

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....

Incorrect Breakpoints Triggered with Property getters when Debugging Windows Store App with Release Configuration

windows-runtime,c++-cx
I'm noticing some odd behaviour when I'm debugging an app written in C++/CX in Release configuration. FYI in case it's relevant I'm using Visual Studio 2013 Community (Update 4). When I place a breakpoint on a some property getter such as Type1::Label::get() I'm noticing it seems to break when Type2::Label::get()...

Portable Class Libraries not recompiling when Windows Phone app is in ARM build configuration

c#,msbuild,windows-runtime,windows-phone
I've just started working with the Lumia (formerly Nokia) Imaging Library. Due to some restraints of the library it is necessary to use either the ARM or x86 build configurations. That's fine, but I have three portable class libraries that are referenced by the app. Whenever I make changes to...

Refresh binding with converter bound to other property

c#,windows-runtime,winrt-xaml,windows-10
I am currently building a WinRT app for Windows 10 and I am facing an issue I can't seem to find an answer for. In my main page, I have a list of map markers bound to an ObservableCollection in my ViewModel. For each of these markers, i need to...

Navigation from OnDoubleTapped method

c#,windows-runtime,windows-store-apps,control,pushpin
I've created a customized Pushpin ( Windows store) and i need to navigate whenever the control double tapped/clicked So i figured out that OnDoubleTapped(DoubleTappedRoutedEventArgs e) will do it,but when i tried .. it didn't work. The following code is from the Control code-behind protected async override void OnDoubleTapped(DoubleTappedRoutedEventArgs e) {...

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...

Why when I try to upload an Image with Windows Phone it uploads a random thing?

c#,php,upload,windows-runtime,windows-phone-8.1
I'm trying to upload an image from my Windows Store App (Windows Phone 8.1) to hosting (using PHP) but always when I "uploaded" the image, and I check its result the "image" it's a corrupted file. I think it's related to the byte array conversion but I haven't found another...

How to create a “Photo Gallery” in windows phone 8.1

windows-runtime,windows-phone-8.1
I'm building one app and I want to make a gallery in my app. What I did was create a GridView binding all my photos. But what I really want to do is, create a gallery the same way of Windows Phone....

GridView with 2 rows and horizontal scroll

c#,xaml,gridview,windows-runtime,windows-store-apps
im trying to achieve something looking like this using a GridView in a Windows Store App project i can get my items in a single line with horizontal scroll, but i want to have a GridView with 2 rows. <GridView Grid.Row="1" Margin="22,0,0,0" Style="{StaticResource GridViewStyle}" SelectionMode="None" ItemsSource="{Binding UserPhotos}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"> <GridView.ItemTemplate>...

Checking for updates to Windows Store apps from within the application

c#,windows-8,windows-runtime,windows-8.1
I'm trying check (programatically) for updates to Windows Store apps from within the application and notifying users about the new release. How can i get the version of the app avalaible on Windows Store ? Thanks...

How to deserialize a xml file

c#,xml,windows-runtime
<countries> <country code="AF" iso="4">Afghanistan</country> <country code="AL" iso="8">Albania</country> <country code="DZ" iso="12">Algeria</country> <country code="AS" iso="16">American Samoa</country> <country code="AD" iso="20">Andorra</country> <country code="AO" iso="24">Angola</country> <country code="AI" iso="660">Anguilla</country> <country code="AQ" iso="10">Antarctica</country> <country code="AG"...

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...

How powerful is winRT?

windows-runtime,microsoft-metro,winrt-xaml,photoshop
EDIT: So apparently the last attempt at this question was to open ended. Allow me to try again: So I've been thinking about Microsoft's 'One Windows' vision, and I am wondering... how powerful could WinRT really be? If someone was to target only PC systems and not phones or tablets,...

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...

Error APPX1706: creating winrt dll with xaml

xaml,windows-phone-8,windows-runtime,windows-store-apps
I built a WinRT(Windows phone 8.1) dll with Page.xaml and App.xaml files. Next, I add reference to this winmd in wp8.1 application project. And I get following error: error APPX1706: The .winmd file 'project.winmd' contains type '?A0x32772d97.project_XamlTypeInfo.XamlMetaDataProvider' outside its root namespace 'project'. Make sure that all public types appear under...

Frame.Navigate() vs this.Frame.Navigate()

c#,windows-8,windows-runtime,windows-store-apps
What is the difference between Frame.Navigate() and this.Frame.Navigate() in a Windows 8.1 Store app? What difference does this Frame.Navigate(typeof(Login)); have with this? this.Frame.Navigate(typeof(Login)); ...

Button doesn't work in FlipView with DataTemplates - WinRT

c#,wpf,xaml,mvvm,windows-runtime
I'm using Flipview and a DataTemplateSelector to determine at runtime which DataTemplate to apply to show items in my control. I have two DataTemplate's, one is static and the second can be used by a undetermined number of items. The problem is that the button does nothing. I've used a...

Cannot access a .resw string resource in WinRT that uses a property dot notation through code?

c#,windows-runtime
Is it possible to access a string resource defined in a .resw in WinRT that uses a property dot notation? I know how to assign the value to a XAML control through the use of the x:Uid property but I also need to access it through code. If I define:...

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...

Disable 'snap scrolling' in listview/gridview WinRT

xaml,listview,gridview,windows-runtime
I may not know what to really call it. But in my app when I scroll a long listview or gridview using touch, the control tries to stop the scrolling in between two elements of the list. So that the top element does not appear half cut. This is although...

Dual WCF + Windows Runtime App == Trouble

c#,wcf,windows-runtime
This is a question about app life cycle. My WinRT client app connects to a Dual WCF service that pushes data into the client at the millisecond level. Everything works fine up to the point where the client app eventually gets suspended. It simply leaves the service hanging in there.......

Styling Windows Phone 8.1/WinRT AppBarButton

windows-runtime,windows-phone-8.1,winrt-xaml,windows-8.1
I'm currently looking to implement a CommandBar for a WinRT Windows Phone 8.1 app. Overall it is very straightforward but I am unable to style the control. I have themed my app so that the accent colour has been changed to green. This works well for pretty much everywhere in...

Is there an element selector by name?

c#,.net,windows-runtime,windows-phone-8.1
I have a button with name - btn01. Is there any type of selector or other technique to select/get this element if I have its name in variable. For example: var name = "btn01"; var buttton = GetButtonByName(name); You can do this easily in Javascript/jQuery and I need such technique...

Save parameters when application is closed

c,windows-runtime,windows-phone
How do I save parameters before closing my Windows Phone Runtime app and use these parameters when I activate my app? I have a String and an int that I need to save.

Dynamically displaying Items using FlipView and DataTemplateSelector in WinRT

c#,.net,wpf,xaml,windows-runtime
I'm using Flipview and a DataTemplateSelector to determine at runtime which DataTemplate to apply to show items in my control. I have two DataTemplate's, one is static and the second can be used by a undetermined number of items. Currently My first view displays: - "This is a test -...

How to change button content and reload it?

c#,.net,windows-runtime,windows-phone-8.1
I have a lot of button elements in a grid matrix. Each of them has name as follows btnXY where x and y are the row and column indexes of the grind matrix. So, I am dynamically selecting such button and trying to change its content like this: Button emptyButton...

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...

Creating a marquee lookalike in Windows Store Apps

c#,windows-runtime,windows-store-apps,marquee
im trying to create the equivalent of this(html) <marquee behavior="alternate">Your bouncing text goes here</marquee> in a Windows Store App, with C# is there any control that can do this or do i have to create a custom one?...

How to access Windows Phone folders from a Gmail Wrapper App

windows,webview,windows-runtime,gmail,phone
I have created a Gmail Wrapper Windows Phone 8.1 (WinRT) application using Webview. When I try to compose an Email and try to add attachments, file picker is not displayed and nothing happens. However when I use the Internet Explorer and login to the same Gmail account and click on...

What is the simplest way to data bound radio button list in WPF

c#,.net,wpf,xaml,windows-runtime
First of all I'm new to WPF, I'm using MVVM Light Toolkit and for about 2 days now I'm scraping the internet trying to find a easy way to create a radio button list. I found many examples that were either too complex in my opinion, either "hacks" ish to...

Design-time xaml requires instance or avoid it?

c#,wpf,xaml,windows-runtime,design-time
I have a problem I can not find how to solve the issue of the Design-time XAML, because it tells me: "Object reference not set an instance of an object". Visual capture: Here my fill of the list from Partial Class MainPage: However, at compile time, it works correctly: And...

Pivot with multiple Header items and a single PivotItem

c#,windows-runtime,windows-phone,windows-phone-8.1,winrt-xaml
Is it somehow possible to create a Pivot with a single PivotItem and multiple headers to create an effect like there are multiple PivotItems but a single one is displayed. All the pivot items will be the same type and will have a single template. One of the problems is...

UnAuthorizedAccessException on StorageFolder.GetFolderFromPathAsync while having access through FilePicker

c#,windows-runtime,windows-store-apps,windows-10
I try to read files from a network location. But I keep getting an UnAuthorizedAccessException. I pick the StorageFolder through StorageFolder.GetFolderFromPathAsync but listing the files throws the exception. When I pick the same folder through the FolderPicker it works. So I tried pinpointing the problem with this code: FolderPicker picker...

How to show only once time page Windows Phone 8.1 Runtime

windows-runtime,windows-phone-8.1
I Want it That One page is only shown once the application starts and the next time go to the Home screen.I'm trying to look into NavigationHelper but doesn't work!

Is it possible to retrieve phone battery status in a Background Task in a WinRT/Windows Universal App?

c#,windows-phone-8,windows-runtime,win-universal-app
I'm attempting to run a timed Background Task in a Windows Universal app. In the Background Task, I'd like get some details about the user's phone, including remaining battery charge percent. It appears that the only way to access Battery info is through the Windows.Phone namespace, which is unavailable to...

Xaml Grid with TextBlock

c#,wpf,xaml,windows-runtime,windows-phone-8.1
Good afternoon everyone, I have a little problem that can seem easy but for what I have there is no solution yet. I tried to provide information to make the solution as easy as possible to be understandable: I have a Grid with 2 columns and 2 rows and I...

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...

Xml serialization/deserialization in WinRT (Store application)

windows-runtime,windows-phone,c++-cx
I need to make a Windows Store application that exchanges xml serialized data over a TCP connection with a server. Since I need to use Direct3D rendering in the application I went for the c++/cx store application template however I ran into issues with xml serialization/deserialization. My usual approach in...

winrt how to get files list from device using c#

c#,.net,windows-runtime,system.io.file
I need get a list of all files in device (phone or PC) in my universal app. In wpf I did somesing like that: class Collection { private StringCollection seachResults; //find all mp3 files in local storage private void ScanDrives() { seachResults.Clear(); string[] drives = Environment.GetLogicalDrives(); foreach (string dr in...

Geofencing doesn't rise event in foreground

c#,windows-runtime,windows-phone,windows-phone-8.1,geofencing
it's first time I am developing app with geofencing. I have problem, that geofence does not rise an event, when device is going into desired arena. I checked msdn and everything should be fine. Here's my code: var _geolocator = new Geolocator(); BasicGeoposition pitchPosition; pitchPosition.Latitude = 45.045213; pitchPosition.Longitude = 19.040611;...

detect if app is sideloaded in windows runtime

windows,windows-runtime,windows-phone-8.1,universal
I am working on a windows phone Runtime app I want to know how can I find if the app is side loaded or it downloaded from Store directly ? Note : I want to prevent application run when it's sideloaded. I want to prevent crack installation of application

Element is already the child of another element - WinRT

c#,windows-runtime,windows-store-apps
I need to develop a structure similar to Windows 8 Start screen. I have a method which I call to populate my RecordTile. Method is like, public static void fnShowTiles(List<RecordTile> objList, Grid objGrid) // objGrid is root Grid which holds this structure { try { // copy the list into...

Programmatic access to USSD from the Windows 10 Desktop

windows-runtime,windows-10,ussd
I have a Windows 10 Desktop application that needs USSD access, and can get operator permission to use it. However, I can’t use AT commands (COM ports are not exposed), and USSD is not offered by the Windows Desktop Mobile Broadband APIs. I thought of using the Windows Runtime USSD...

Template specific constructor

c++,windows-runtime,c++-cx
I'm writing my own vector class and i got a problem. i defined my class as template,i have definition for each of the vector sizes and i want specific constructor for each of the vector sizes. here is the code: template<int size> ref class Vector { internal: Vector(int _x, int...

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...

What is exactly the d__Xa part in stack in async code?

windows-runtime,stack,async-await
When I have this row in a stack of an exception: WebApiAccessService.<GetStudentKey>d__14a.MoveNext() What is the "d__14a"? Is it something which could tell me (without symbols) some offset from the start of the method?...

How do you underline selected text in a WinRT RichEditBox?

c#,windows-runtime,richeditbox
I'm currently making an application which includes a rich text editor, however I'm having some issues with applying formatting to the text. Specifically, I'm having an issue with underlining the selected text. Here is my current code. private void UnderlineButton_Click(object sender, RoutedEventArgs e) { ITextSelection selectedText = rtfEditor.Document.Selection; if (selectedText...

The path (ImageSource) in WinRT to display an image that is saved in Pictures folder (not in app packages)

xaml,windows-runtime,winrt-xaml
So, i've saved my image in StorageFile picture = await KnownFolders.PicturesLibrary.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); and i want to display it in XAML : <Image Grid.Row="1" Grid.Column="0" x:Name="Photo" Source="ms-appx:///Pictures/test.png" VerticalAlignment="Center" HorizontalAlignment="Left" Stretch="Fill" Width="1024" Height="768"> </Image> and it's not working :( Thank you very much for you help :)...

WinRt - FileSavePicker, save image from URI to file

c#,windows,windows-runtime,windows-8.1
I would like to ask how I can save image from stream to file. I have created this FileSavePicker, but I don not know how i can save image from Uri Thanks StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadLine(); // URi with image private...

Delegate.Method property on WinRT

c#,unity3d,delegates,windows-runtime
I'm trying to port a Unity game to WinRT and currently have a problem with delegates. The current code uses the Method property of the Delegate class. But this property seems not to exists on WinRT anymore. What is the alternative for this on WinRT?

Stopping background audio task on app termination

windows-runtime,windows-store-apps,windows-phone-8.1,background-audio
Due to the way that BackgroundAudio task and app lifecycle are built up, there doesn't seem to be a way to detect actual closing of the app and stopping its background task at this point. This creates an odd situation for the user, where she can try to forcibly terminate...

Uploading a StorageItemThumbnail to Azure blob storage from a Windows Universal app

azure,windows-runtime,windows-azure-storage,win-universal-app,storagefile
I am building a Windows Universal app. I have a Windows.Storage.FileProperties.StorageItemThumbnail obtained from a Windows.Storage.StorageFile as the result of a call to StorageFile.GetThumbnailAsync. Now I need to upload the thumbnail to Azure blob storage. The correct method appears to be UploadFromFileAsync or UploadFromStreamAsync on Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob. But the only documentation I...

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#...

Refresh ListView item with Image's Source bound to property

c#,listview,windows-runtime,windows-phone-8.1
I have problem with refreshing my listview data. It doesn't update unless i call: List.ItemsSource = null; List.ItemsSource = listviewSource; This is works but doesn't look good (screen flashes) so i wanted to use, as people sugeste,d INotifyPropertyChanged. My listviewSource is ObservableCollection< Class2> where Class2 implements Class1 and Class1 implements...

ScrollIntoView with animation

c#,windows-runtime,winrt-xaml
I have a groupped gridview and i need to scroll on group with animation. Now i use method GridView.ScrollIntoView(object item) which works good, but i need to add some animation. Plan: I want extract ScrollViewer from gridview using extension method GetFirstDescendantOfType<T> from WinRTXamlToolkit and then use method of ScrollViewer ChangeView(..)....

Send email with attach file WinRT

c#,windows-runtime,windows-phone-8.1
I need to send an email with a log file from my windows phone 8.1 app. I found this way : var mailto = new Uri("mailto:[email protected]&subject=The subject of an email&body=Hello from a Windows 8 Metro app."); await Windows.System.Launcher.LaunchUriAsync(mailto); Is there a special parameter to specify the attach file or another...

Animate zoom factor programmatic in a ScrollViewer

c#,gridview,windows-runtime,storyboard,winrt-xaml
Is there a way that I can animate changing the zoom factor of a ScrollViewer for Windows Runtime? I'd like to be able to have an image inside one respond to a tapped event by returning to a default zoom of 1. While it seems that in Windows 8.1 Change...

Performant search in listview

c#,linq,listview,windows-runtime
I am using Linq to search and show a specific string in a ListView on WinRT (Windows Phone 8.1). This is my current method: string value = (string) sender.Text.ToLower(); if (value == "") { AirportsList.ItemsSource = _airports.CountryList; } else { List<Airport> queryList = _airports.AirportList .Where(airport => airport.IcaoId.ToLower().Contains(value) || airport.IcaoName.ToLower().Contains(value) ||...

How can I create a StorageFile object from URI?

javascript,html5,windows-runtime,windows-store-apps,winjs
I'm working on a HTML+JS app. I have to launch image file from Internet in native photo app. Code to launch: var uri = new Windows.Foundation.Uri("http://someuri.com/somefile.JPG"); Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).then( function (file) { // Launch the retrieved file using the default app Windows.System.Launcher.launchFileAsync(file).then( function (success) { if (success) { // File launched }...

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...

Is Task.Run or Task.Factory.StartNew are bad practice for windows phone or any other client platform?

c#,.net,windows-runtime,windows-phone,async-await
I have WP 8.1 app that using web service a lot, and I want to keep it as much responsive as possible. From iOS dev expierense - there is one strict rule: "Do not do in UI thread any complex calculations! Doesnt matter how you will reach this: with blocks...

Editing the list of apps that appear when i share a file in Windows Store App

c#,windows-runtime,windows-store-apps
On a Windows Store App project im using the This method to send a email with an attachment, and it is working well but i would like to know if there is a way to define wich apps appear on the share list, for example i don't want the crossed...

How to use Toast Notification while the app is running on Windows Phone 8.1 Runtime App?

windows-runtime,windows-phone-8.1,toast
I'm working on a budget manager app. My app records expense and income as they are input by the end user. But I wanted to add a functionality to the app : users would be able to add an income/expense that would happen on a regular basis (like every 10...

Attempting to deserialize an object using JSON.NET in Windows 10 Universal App fails with FileNotFoundException

c#,windows-runtime,json.net,windows-10
I'm using the Windows 10 Preview SDK, and attempting to port forward some code that depends on JSON.NET. It's failing with the following exception: {"Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.":"System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e,...

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...