Menu
  • HOME
  • TAGS

Check if a character typed in a PasswordBox is numeric or not

c#,xaml,windows-store-apps,windows-8.1

You can subscribe for KeyDown event on the PasswordBox. Maxmum Length can be restricted by setting MaxLength property. private void OnKeyDown(object sender, KeyEventArgs e) { if ((e.Key >= Key.D0 && e.Key <= Key.D9) || (e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9)) return; e.Handled = true; } ...

Collecting All The User Reviews From The AppAtore

ios,windows-store-apps,app-store

I don't think that you can do that unless you have all applications ids.

adal javascript windows store app token

javascript,asp.net-web-api,windows-store-apps,adal

The library version you are using is ancient and not supported. Also, cookies play no part in the api communications. I recommend switching to the latest stable ADAL. Windows Store sample using ADAL: https://github.com/AzureADSamples/NativeClient-WindowsStore

Public IDictionary member of ViewModel class will not serialize via DataContractSerializer

c#,windows-store-apps,datacontractserializer

If you change the setter of your DataDictionary property from 'private' to 'public', then it should work as expected

Can I sleep/hibernate the PC from a windows store app?

hibernate,windows-store-apps,sleep

Windows store apps are using WinRT , and WinRT does not support actions like Sleeping / Restarting etc. Simply , you can't....

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

c#,windows-8,windows-runtime,windows-store-apps

There no difference. The this keyword refers to the current instance of the class and is also used as a modifier of the first parameter of an extension method. https://msdn.microsoft.com/en-us/library/dk1507sz.aspx...

Windows XAML: Replacement for WPF TextBox's CharacterCasing

c#,xaml,user-interface,windows-store-apps,converter

This is the code I made for it in VB.Net but it should be easy to translate to C# Make a textchanged event for your textboxes and call a method giving it your sender as a textbox Private Sub AnyTextBox_TextChanged(sender As Object, e As TextChangedEventArgs) TextBoxToChange = (CType(sender,Textbox)) TextBoxToChange.Text =...

Windows Store Apps unavailable in VS 2015 RC

c#,windows-8,windows-store-apps,visual-studio-2015

Minimum required OS for developing Windows Store Apps is Windows 8. With Windows 7 you wont be able to develop Store apps.

Remove item from list based on listview selected item

c#,listview,visual-studio-2013,windows-store-apps,selecteditem

I have had some trouble making sure I am really testing the code you actually want help with. But I think I have seen enough to understand what the problem you are having is. Specifically: you don't have any connection between the ListView where the items are displayed, and the...

Microsoft App Submission Dashboard page sets AdUnitId to “none”?

c#,.net,windows-phone-8,windows-store-apps

Ok, So finally I resolved this issue and I thought to post it here so that others will get benefit too. I have noticed that its a one way process, creating app id in PhoneSubmission page informs Pubcenter, but creating appId in Pubcenter may or may not informs Microsoft's In-App...

Cant get twoWay Binding from Xaml to ObservableCollection Working

c#,binding,windows-store-apps,winrt-xaml,inotifypropertychanged

The correct XAML should look like <TextBox Text="{Binding ValveName, Mode=TwoWay}"/> rather than <TextBox Text="{Binding ValveName}, Mode=TwoWay"/> Edit On a side note: This code isn't thread safe. Between this.PropertyChanged != null and this.PropertyChanged another thread could unsubscribe and PropertyChanged becomes null. public void OnPropertyChanged(string propertyName) { if (this.PropertyChanged != null) {...

Is it possible to use System.Net.Mail in a Windows App?

c#,windows-store-apps

No. System.Net.Mail is not available in Windows Store apps. Windows.Store apps can use only the parts of the .Net Framework available in the .Net Framework for Windows Store apps. Windows Store apps do not have an explicit email API. In most cases you are better off letting the user choose...

Load local text file with Windows Metro Javascript

javascript,windows-store-apps

You can identify files included in the appx package with the ms-appx: protocol and can read it with the Windows Runtime StorageFile and FileIO classes. See Quickstart: Reading and writing files (HTML) and the File access sample. var fileName = new Windows.Foundation.Uri("ms-appx:///file.txt"); Windows.Storage.StorageFile.getFileFromApplicationUriAsync(fileName).then(function (file) { Windows.Storage.FileIO.readTextAsync(file).then(function (fileContent) { loadedList =...

Add music to windows 8.1 app - Visual studio 2013

windows,visual-studio-2013,windows-store-apps

Do you mean music while the app is playing or music running when the app is in the background? For both you'll set up a MediaElement running the music file you want to play. Since the MediaElement will only play while it's in the visual tree you need to play...

Caliburn Micro get service instance

c#,windows-store-apps,windows-phone-8.1,caliburn.micro

I'm supposing you are using MEF with Caliburn.Micro So you can get an instance this way : SampleService service = IoC.Get<ISampleService>(); Hope this will help you....

convert a bitmapImage to byte array for windows store

c#,vb.net,windows-store-apps,windows-store

I found it :D Async Function bitmapTObyte(ByVal bitmapimage1 As StorageFile) As Task(Of Byte()) Dim fileBytes As Byte() = Nothing Using stream As IRandomAccessStreamWithContentType = Await bitmapimage1.OpenReadAsync() fileBytes = New Byte(stream.Size - 1) {} Using reader As New DataReader(stream) Await reader.LoadAsync(CUInt(stream.Size)) reader.ReadBytes(fileBytes) Return fileBytes End Using End Using ...

Multiple item template inside grid view in Windows 8.1 store app

c#,xaml,windows-store-apps,winrt-xaml,windows-8.1

Yes, you can. You need a DataTemplateSelector. You can select an appropriate template for the selected object in the grid/list. Sample for selector: class TemplateSelectorMyPage : DataTemplateSelector { public DataTemplate NormalIconTemplate { get; set; } public DataTemplate BigIconTemplate { get; set; } protected override DataTemplate SelectTemplateCore( object item, DependencyObject container...

Do ApplicationData.localSettings get cleared when the app gets updated?

windows-store-apps,windows-store

Those settings are preserved across app updates, as are the roamingSettings and the contents of localFolder, roamingFolder, and tempFolder. In other words, performing an app update does not affect any of the appdata state, which makes perfect sense when you consider that many updates are minor bug fixes and should...

image slideshow with dispatcher timer in windows store apps

c#,image,windows-store-apps,windows-8.1,slideshow

Logical flaw. In your code, the counter is changed twice, first from Images1.Count - 1 to 0, then incremented in the second if statement from 0 to 1. My fix if (count1 < Images1.Count) count1++; if (count1 >= Images1.Count) count1 = 0; ImageRotation1(); ...

Azure StorageException is inaccessible due to its protection level

c#,azure,visual-studio-2013,windows-store-apps,windows-azure-storage

Azure Storage Client Library for Windows Runtime does not expose the StorageException type, because Windows Runtime components are not allowed to declare public exception types (see Throwing exceptions for more information). You can instead pass in an OperationContext object and then check its LastResult....

How to introduce a delay in actions for my Windows 8 app

c#,windows-store-apps

Example with 5 seconds delay: DispatcherTimer timer = new DispatcherTimer(); // Call this method after the 60 seconds countdown. public void Start_timer() { timer.Tick += timer_Tick; timer.Interval = new TimeSpan(0, 0, 5); bool enabled = timer.IsEnabled; // Check and show answer is correct or wrong timer.Start(); } void timer_Tick(object sender,...

Element is already the child of another element - WinRT

c#,windows-runtime,windows-store-apps

As @Rawling suggested, clearing the Tiles from StackPanel before objGrid.Children.Clear(); was the solution. Added following code before that statement and it worked like a charm. foreach (StackPanel panel in objGrid.Children) { panel.Children.Clear(); } ...

How to create the special toast and swipe down on lock screen like Skype in win8.1?

c#,windows-store-apps,windows-8.1,skype,lockscreen

The Alarm Toast Notification sample shows how to do this for an application that is the Alarm application for the machine: https://code.msdn.microsoft.com/windowsapps/Alarm-toast-notifications-fe81fc74 If your application is a VOIP application then you can modify the toast XML String in that sample to be the following: string toastXmlString = "<toast duration=\"long\">\n" +...

How to handle mutiple async methods from running?

c#,asynchronous,windows-store-apps,winrt-xaml,winrt-async

Store the task and check for IsCompleted Property. private Task pendingTask = Task.FromResult(0); private async void Button1Click() { if (!pendingTask.IsCompleted) { //Notify the user return; } pendingTask = DoSomethingAsync(); await pendingTask; ... } private async void Button2Click() { if (!pendingTask.IsCompleted) { //Notify the user return; } pendingTask = DoSomethingElseAsync(); await...

Windows Store App (sideloaded) and communication with REST services

c#,rest,windows-store-apps

I thought that those two capabilities are enough: Private Networks with Enterprise authentication - I was mistaken. Despite of that the web service is at the company server, and my windows device was added to company domain I have to set another capability at windows store manifest file: Internet(Client) And...

ObservableCollection to 1 of 3 listviews depending on some property

c#,listview,visual-studio-2013,binding,windows-store-apps

Ugh. So, I didn't realize this but it turns out that Winrt (i.e. Windows Store apps) does not support filtering in ICollectionView. It seems like every time I turn around, I find another XAML/WPF feature that was inexplicably omitted from Winrt, and this is one of them. So, while this...

How do I Random all the items in the listbox?

c#,xaml,random,listbox,windows-store-apps

Here is an example. XAML: <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <ListBox Grid.Row="0" Name="Playlist" ItemsSource="{Binding Path=PlaylistItems}"/> <Button Grid.Row="1" Name="Shuffle" Content="Shuffle" Click="Shuffle_Click"/> </Grid> Note that there is PlaylistItems binded to ListBox. It would be the best to manipulate the collection of items, which is binded to ListBox, instead of manipulating ListBox...

RichEditBox two-way binbing does not work [Windows Store App]

c#,data-binding,binding,windows-runtime,windows-store-apps

Because I cannot comment, I have to rewrite my answer! :-( Create a class and name it RichEditBoxExtended Replace the class code with the code from WinRt: Binding a RTF String to a RichEditBox (please recopy I changed the visibility of the class) Go to your XAML and enter: <local:RichTextBoxExtended...

Linq, join and null how to check a value

c#,linq,windows-store-apps

Basically what you want is a left outer join. you can do that by using join into instead of just join. var res = from t in tmp group t by t.UserID into g join c in com on g.Key equals c.UserID into j from subc in j.DefaultIfEmpty() select new...

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

c#,windows-runtime,windows-store-apps,windows-phone-8.1,windows-8.1

It is unclear what "SomeRandomKey" is in your example, and what you are trying to achieve with it. But this exception is thrown because TextBlocks don't have a SomeRandomKey property. They have Text, Width, but definitely not "SomeRandomKey". Just remove it.

Stopping background audio task on app termination

windows-runtime,windows-store-apps,windows-phone-8.1,background-audio

The BackgroundAudioTask is designed to continue even the main app has been terminated/suspended. There is no way to inform the BackgroundTask that the suspended app has been terminated. After the app is suspended, no events are called or any code is run from your app. The last things what you...

How to open Popup by clicking on grid view item in windows store app?

c#,xaml,windows-store-apps

All you have to do is on the Onclick event of your gridview's button do the following code : popup.isopen = true Then in your popup if you want to navigate to another page all you have to do is use Navigate on the proper event Frame.Navigate(typeof(YourPage),YourID); EDIT : If...

Hash and Salt string in Windows Store App

c#,hash,windows-store-apps,salt,sha

There is an alternative to using RNGCryptoServiceProvider var buffer = CryptographicBuffer.GenerateRandom(saltlength); var string = CryptographicBuffer.EncodeToBase64String(buffer) Windows.Security.Cryptography is the alternative to System.Security.Cryptography for windows store apps....

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

c#,windows-runtime,windows-store-apps

You can't do that. If you only want to send an e-mail you could call the e-mail app directly: How to launch other apps https://msdn.microsoft.com/en-us/library/windows/apps/hh452690.aspx Mailto syntax http://www.labnol.org/internet/email/learn-mailto-syntax/6748/...

Can't Navigate to next Frame [duplicate]

wpf,navigation,windows-store-apps,windows-phone-8.1

Add async keyword to OnNavigatedTo method and add await Task.Delay(10); before Frame.Navigate() call. Alternatively, you can execute Frame.Navigate() in Dispatcher. 1) using delay protected override async void OnNavigatedTo(NavigationEventArgs e) { await Task.Delay(10); Frame.Navigate(typeof (LoginView)); } 2) using Dispatcher protected override async void OnNavigatedTo(NavigationEventArgs e) { Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Frame.Navigate(typeof(LoginView));...

GridView with 2 rows and horizontal scroll

c#,xaml,gridview,windows-runtime,windows-store-apps

I have to say that is not really intuitive and the default behavior is usually vertical for the scrollviewer, here is the solution: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ScrollViewer VerticalScrollBarVisibility="Hidden" VerticalScrollMode="Disabled" HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Enabled"> <GridView Grid.Row="1" Margin="22,0,0,0" SelectionMode="None" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"> <GridView.ItemsPanel>...

How to detect If AdRotator V2.1 is showing an Ad or an error occurred

windows-store-apps,windows-8.1,ads,adrotator

This is hack i am currently using. Its quite brittle. Its looking at log message for strings to detect if an error has occurred. public class BaseAdControl { public AdRotatorControl CurrentAdRotatorControl { get; set; } private UserControl userControlWrapper; public BaseAdControl(AdRotatorControl MyAdRotatorControl, UserControl userControlWrapper) { // TODO: Complete member initialization this.CurrentAdRotatorControl...

Windows Store App - Dynamic Binding

c#,windows,windows-store-apps,winrt-xaml

You need to set the binding path and I used always the static SetBinding: var binding = new Binding { Source = _sectionHeaderSlider, Mode = BindingMode.TwoWay, Path = new PropertyPath("Value"), }; BindingOperations.SetBinding(ScrollTransform, Windows.UI.Xaml.Media.CompositeTransform.TranslateXProperty, binding); ...

How to call a function in Windows 8 app?

javascript,html,windows-store-apps,windows-8.1

I solved it. There is no way (From what I know) to call a function that is not in the function itself. When I write the function like a regular function in the function itself it worked. Example for what I found: anotherFunction: function () { function textchange() { document.getElementById("id").innerText...

WCF Service times out from windows 8 unit test project

wcf,unit-testing,windows-store-apps,windows-8.1

Because this is a store app, it runs in a sandbox (AppContainer) and therefore certain things (like WCF) do not work from "unit tests" out of the box. In order to get this to work, I had to add a Loopback Exemption to my development machine for the unit test...

How do I get the text, not the name of the comboboxitem, from a combobox with C# in Windows Runtime?

c#,xaml,windows-store-apps

I searched for an answer for an hour before asking the question. As usual, the answer presented itself only a moment later: <x:String>Sort By HSB</x:String> The items should not be ComboBox items, they should be strings. If anyone wants to comment and let me know more about the "x:" and...

ListBox selected item background color

xaml,windows-store-apps

I just did this recently for one of my apps using a ListView. It should be similar for ListBox but you might want to use ListView as they are similar and I know it works. You need to modify the style to set the SelectedBackground and SelectedPointerOverBackground colors. I set...

XAML GridView in GridView with different orientation

xaml,windows-runtime,windows-store-apps

Simple working example: Linking only vertical offset of two scrollviewers And I found advanced example in 5th sample of the "XAML input and manipulations - advanced concepts": https://code.msdn.microsoft.com/windowsapps/XAML-input-and-manipulation-44125241...

Wizard Design for modern UI (Windows 8.1)

windows-8,windows-store-apps,windows-8.1

Back button, content, next button. Very easy and can be found in google images.

Value does not fall within the expected range windows store app

c#,xaml,listview,windows-store-apps,windows-8.1

The ItemsSource property should be assigned the orders collection, not the OrderRootClass instance. var orderData = JsonConvert.DeserializeObject<OrderRootClass>(response); OrderListView.ItemsSource = orderData.orders; // here However, it should have given you a compiler error saying that orderData does not implement IEnumerable....

Appbar guidance results in “Invalid qualifier: SCALE-240”

windows-store-apps,appbar,windows-universal

Scale-240 is recommended for Windows Phone apps and works there (the default templates provide Scale-240 assets). Windows Store apps typically use scales-80,100,150, and 180. See How to name resources using qualifiers The Scale-240 asset won't cause any problems at runtime, but will be ignored on Windows. You'll definitely want to...

Is legacy winsock available for windows store apps? [closed]

c#,windows-store-apps,winsock

Yes, the bulk of the winsock APIs are available for both Windows 8.1 and Windows Phone 8.x Store Apps (and of course Universal Windows Apps in Windows 10). There are still some restrictions around access to loopback addresses etc. but the APIs should be available to you.

Encrypt & Decrypt Local Images in Windows Store App

c#,encryption,windows-store-apps,base64,windows-8.1

It's easiest if the images you want to encrypt are loaded from files and written back out to files. Then you can do: async void EncryptFile(IStorageFile fileToEncrypt, IStorageFile encryptedFile) { IBuffer buffer = await FileIO.ReadBufferAsync(fileToEncrypt); DataProtectionProvider dataProtectionProvider = new DataProtectionProvider(ENCRYPTION_DESCRIPTOR); IBuffer encryptedBuffer = await dataProtectionProvider.ProtectAsync(buffer); await FileIO.WriteBufferAsync(encryptedFile, encryptedBuffer); } DataProtectionProvider.ProtectStreamAsync...

MediaCapture VideoStabilization fails with 0xC00D4A3E

c#,windows-store-apps,windows-universal,windows-10

The desiredProperties parameter of the GetRecommendedStreamConfiguration method needs to get MediaEncodingProfile that will be used when calling your choice of MediaCapture.StartRecordTo* (i.e. the "output properties") to see what your desired VideoEncodingProperties are. The error is being triggered because the VideoEncodingProperties from the VideoDeviceController (i.e. the "input properties") are being passed...

Different builds of SQLite in the same Windows Store app bundle

windows,sqlite,sqlite3,windows-store-apps,64bit

You should use MakeAppx tool to create valid appx package bundle, because they are signed. Here is the tutorial about creating bundles.

Collapsed Grid in StackPanel change position of other controls in StackPanel

c#,xaml,windows-store-apps,windows-8.1,visibility

Simply set it's opacity to 0 if you don't want to deal with resizing etc.However you must consider interactions like tapping or clicking. Setting an opacity instead of Visibility is much usefull in terms of performance and it's easy....

Package.appxmanifest: Identity-property and certificate (correlation?)

c#,windows-store-apps,certificate,windows-store

If you're publishing through the store you don't need to worry about this. The store will sign the app. Associate the app with the store from Visual Studio and it will set the Identity etc. for you. You don't need to do this manually. You only need to handle signing...

How to externalize properties in a Windows Store App

javascript,.net,windows-store-apps

You could certainly make an HTTP request from the app on startup to retrieve a configuration file, but that of course assumes connectivity which may or may not work in your scenario. For a Store-acquired app, this is really the only choice. In your scenario, however, you'll be doing side-loading...

Issue with DispatcherTimer for a Countdown clock

c#,windows-store-apps

Do not subscribe to the DispatcherTimer every time you call CountDown. DispatcherTimer timeLeft; int timesTicked = 60; public QuickPage() { timeLeft = new Dispatcher(); timeLeft.Tick += timeLeft_Tick; timeLeft.Interval = new TimeSpan(0,0,0,1); } private void QuestionGenerator() { timeLeft.Start(); if (iAsked < 6) { //Code to generate random question } } ...

Working with MIDI in Windows Store App (Win 8.1)

c#,audio,windows-store-apps,midi

I managed to make it work. I've changed the platfrom to x64, and now it works (I used to build it for x86). There is still a problem though (and it is even bigger): I want to integrate this with Unity3d, but Unity3d doesn't allow to build x64 windows apps,...

How to show Windows Phone application to client before publish in store

windows-phone-8,windows-phone,windows-store-apps

You can submit your app to Windows Phone Store BETA. Your app will by certified quickly, and your client will be able to download it just like any other app from Store. The difference is that it will be visible and possible only for him. Log in to you DevCenter...

Windows Runtime App TypeCode

.net,vb.net,windows-store-apps

One option is to change the Select Case block to a set of If Else statements, and the comparisons from TypeCode to GetType: Dim type = ce.GetType() If type Is GetType(Int32) OrElse type Is GetType(UInt32) OrElse _ type Is GetType(Int64) OrElse type Is GetType(UInt64) Then value = ParseNumber(Text, target) ElseIf...

How to playback videos with YouTube API v3 in Windows Store apps?

c#,xaml,windows-store-apps,youtube-api,youtube-data-api-v3

It was easier than I thought. I had to update the MyToolkit reference of my project. In addition I had to add MyToolkit.Extended to make use of the YouTube classes. packages.config <packages> <package id="MyToolkit" version="2.3.30.0" targetFramework="win81" /> <package id="MyToolkit.Extended" version="2.3.30.0" targetFramework="win81" /> </packages> ...

Hub/Pivot App template breaks when navigated

javascript,html5,windows-store-apps,windows-phone-8.1,winjs

Problem was solved by changing class in CSS-file of page created as PageControl. Here's code we need to edit: .fragment { -ms-grid-columns: 1fr; -ms-grid-rows: 128px 1fr; display: -ms-grid; height: 100%; width: 100%; } Just change class in html- and css-file, for example, to fragment2, and nothing breaks when you navigation...

How can I sign my Windows Store app from Window Store certificate?

visual-studio-2013,windows-store-apps,certificate,sign

I believe you only need to sign your app if you are sideloading it. If you upload it to the Windows Store, Microsoft will sign the app for you. From the MSDN article Submitting Your Windows 8 Apps: Signing and publishing. In this final step, we'll sign the packages you...

CameraCaptureUI in Windows 8 application takes a mirrored photo

c#,windows-store-apps,bitmapimage

If you want to flip the image that you saved from the stream try this: How to Verticaly Flip an BitmapImage Basicly you should use ScaleTransform instead of Rotation....

Force the App to become on Portrait View when clicking a Button

c#,windows-store-apps,windows-8.1,screen-orientation

It turns out that it is impossible to Set the Application to a certain ApplicationView, Portrait or Landscape without physically turning the device. I tried to trick the user by rotating my image (by animating it in Blend) to look like it's in a Portrait View. The user will then...

Windows Store Apps, download multiple files with threads

c#,multithreading,windows-store-apps,httpclient

you can use Task.WaitAll. It waits for all of the provided Task objects to complete execution. var t1 = DownloadFileService("file1", "1"); var t2 = DownloadFileService("file2", "2"); var t3 = DownloadFileService("file3", "3"); Tasks.WaitAll(t1, t2, t3); ...

Caching Views in XAML changes appearance?

xaml,caching,windows-store-apps

Does this make sense / improve performance of loading controls? Yes, it does make sense, however there are a few things to consider with this. Probably the most important thing is memory management. You need to consider how much memory you will be using when caching your views. Picture...

Windows phone Store app Font size Issue

fonts,windows-runtime,windows-store-apps,windows-phone-8.1,font-size

Sure, XAML text elements support the property IsTextScaleFactorEnabled which is set to true by default. If you want your elements no to be affected by the ease of access settings simply set that property to false: <TextBlock Text="Looking fresh" IsTextScaleFactorEnabled="False" /> You can read more here: https://msdn.microsoft.com/en-us/library/windows/apps/hh868163.aspx...

How to access an element in UserControl from the MainPage?

c#,windows-store-apps

It turns out that if this UserControl is not my current ItemTemplate: I can't access any of its controls.

Why would you use DataTemplate in a ListView?

c#,wpf,xaml,windows-phone-8,windows-store-apps

DataTemplate is used to show data in ways beyond a simple text block. Sure doing this: <ListView.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Name}"/> </DataTemplate> </ListView.ItemTemplate> Doesn't buy you much. But it allows you to do stuff like this: <ListView.ItemTemplate> <DataTemplate> <StackPanel> <Image Source="{Binding ImagePath}"/> <TextBlock Text="{Caption}"/> </StackPanel> </DataTemplate> </ListView.ItemTemplate> Which is pretty...

CameraCaptureUI in some container

c#,camera,windows-runtime,windows-store-apps

1) Add capabilities "Microphone" and "Webcam". 2) Define CaptureElement in the view. <CaptureElement Name="captureElement"/> 3) Create field in your class MediaCapture. private readonly MediaCapture _mediaCapture = new MediaCapture(); 4) Create method that fill CaputreElement with live content from camera. async Task ShowPreview() { try { await _mediaCapture.InitializeAsync(); captureElement.Source = _mediaCapture;...

Save/Get ObservableCollection to/from Roaming

c#,json,windows-store-apps,observablecollection,win-universal-app

The easiest way is to write it in a file in the app data roaming folder; app settings aren't very convenient to store collections. You can use XML, JSON or anything else. These days the trend is to use JSON, so here's an example. Serialization: var folder = ApplicationData.Current.RoamingFolder; var...

XAML Style common ancestor

c#,xaml,windows-runtime,windows-store-apps

Try this. <Style TargetType="TextBlock" x:Key="TahomaBase" BasedOn="{StaticResource YourStyleAncestor}"> <Setter Property="FontFamily" Value="Tahoma" /> <Setter Property="HorizontalAlignment" Value="Left"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="TextWrapping" Value="NoWrap"/> </Style> ...

Navigation from OnDoubleTapped method

c#,windows-runtime,windows-store-apps,control,pushpin

This can be solved via using a dispatcher : Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, new DispatchedHandler(() => { Frame thisFrame = Window.Current.Content as Frame; Window.Current.Activate(); thisFrame.Navigate(typeof(Target)); })); ...

Opening another WinRT app from another running app in FULL mode

c#,windows-store-apps,windows-8.1

Windows Store apps don't have any way to directly launch other apps. I assume you're launching a URI or file and your app is registered as the default handler (users can choose something else). In your call to Launcher.LaunchUriAsync you can set the DesiredRemainingView in your LauncherOptions to indicate how...

Microsoft Band SDK on Windows 8,1

windows-store-apps,microsoft-band

A couple of things than can be tried and may have an effect are: Disable Power Saving on the PC's BT Adapter On your PC, launch Device Manager (e.g. by right clicking the Windows 8.1 Start Button and choosing "Device Manager") In Device Manager, go to Bluetooth -> and right...

Error APPX1706: creating winrt dll with xaml

xaml,windows-phone-8,windows-runtime,windows-store-apps

A WinMD library is basically a regular library (DLL) with some metadata information. These metadata information will allow it to be used from different languages. You can for example, create a WinMD library in C# and use it from a C++ or JS application. Since the WinMD Library can be...

WinRT-xaml-Toolkit: Line Series with median Line

xaml,windows-store-apps,winrt-xaml,silverlight-toolkit,winrt-xaml-toolkit

I don't think there are any built in statistical functions in the DataVisualization library that I ported from Silverlight Toolkit, but you can provide your own data source separate from your Articles one that has any range of values you want. I also can't recall if the filled style of...

Application configuration files for Windows Universal app

windows-phone-8,windows-store-apps,windows-universal

No direct equivalent, you need to create something similar by yourself.

Activator with MvvmCross and PCL

xamarin,windows-store-apps,mvvmcross

Thanks for all the answers. I am feeling a little embarrassed now, because I figured the problem out and it was totally my fault :). @Anders: You was right, I misspelled the Activator in the Immediate windows and that is why the error was there in the first place -...

Get folder from windows service(system.io) to Windows store App (Windows.Storage)

.net,vb.net,windows-store-apps,windows-8.1,storage

After looking for a while this seems quite impossible to do. However I have found a way to go around the problem by passing each file 1 by 1 into a memorystream. It is possible to store an image into a memorystream and then, on the client, take that stream...

Local file storage during development of a Windows Store App

visual-studio-2013,windows-store-apps

As others have pointed out, the app will be installed locally and the app's data will reside in some common place like C:\Users\YourUserName\AppData\local\packages during development. Check with the Packaging tab of your Package.appxmanifest file to determine the Package family name, it's probably going to be something cryptic. There'll be a...

StorageFile filled with stream, not replacing the File

c#,windows-store-apps,itextsharp,filesavepicker

You open it for ReadWrite which preserves the previous contents. In order to truncate you need to cast to a FileRandomAccessStream and then set the Size to zero: var picker = new FileOpenPicker(); picker.FileTypeFilter.Add(".txt"); var file = await picker.PickSingleFileAsync(); var stream = (await file.OpenAsync(FileAccessMode.ReadWrite)) as FileRandomAccessStream; stream.Size = 0; var...

How to add a simple calendar to my windows store app

visual-studio-2013,calendar,windows-store-apps

What I do understand about Calendars, is there are fourteen of them in total that are possible - seven for each day of the week a normal year begins on, and seven more for leap years. You may have to create all fourteen and put them in somehow. There is...

Transfer images from server to local folder Windows Store App

.net,vb.net,web-services,windows-store-apps,file-transfer

Big Thanks to ChicagoMike for putting me on the right track. Here is how I did it Object to transfer from the service to the client : Imports System.IO Public Class PictureSender Public Property Memory As MemoryStream Public Property PictureName As String End Class Code on the client calling its...

Win8/RT Using a custom (.ttf) font

c#,xaml,windows-8,windows-store-apps,winrt-xaml

Try to set FontFamily to /fonts/pirulen rg.ttf#Pirulen Rg. Notice the leading '/'. Basically relative paths are relative to location of your XAML file, so unless your XAML file is in the root you should start your asset paths with '/'.

Windows store app ItemsControl HTML-table-like behavior

wpf,windows-store-apps

Unfortunatelly, there isn't such panel available by default. If number of your items is static (or at least number of columns is static), you can use Grid as ItemsPanelTemplate, and set Grid.Row and Grid.Column in ItemContainerStyle trough converter. Otherwise, you need to implement your custom panel by overriding ArrangeChildren and...

MultiBinding(WPF) alternative for Windows Store Apps

windows-runtime,windows-store-apps,winrt-xaml

Considering that the data your are binding are coming from different view models and it could be too complicated to merge them into a single property, you should consider creating a custom control to handle this scenario. While you will still not be able to multi-bind, you will be able...

Errors in Generated Files for WinRT XAML DirectX Universal App

c++,visual-c++,windows-runtime,windows-store-apps,winrt-xaml

I created another project walking through the steps I had performed, and ran a diff on the two projects. The entire Common directory (and namespace, which included NavigationHelper) was unique to the original project. I then remembered that at one point I had accidentally added a XAML page. I promptly...

C# Windows APP: Adding UIElements to Grid/GridView

c#,windows,windows-store-apps

Ive found a way but forgot to update this: If you want to to set a Button for example in a specific row/col then you have to do this: Button btn = new Button(); // Empty Button int Row = 0; int Col = 1; Grid.SetRow(btn,Row); Grid.SetColumn(btn,Col); You have to...

Where is the Conversion Namespace in Windows Store Apps

.net,namespaces,windows-store-apps,windows-8.1

If I understand what CTypeDynamic does then System.Convert.ChangeType(Object, Type) looks like the equivalent and is available in the .NET for Windows Runtime apps

Add striped background in windows store app

c#,xaml,windows-store-apps

Personally I prefer not to add elements like images if I don't need to and leave these types of design additions more flexible in case I want to play off of them in the future with things like animations, or changing the pattern on the fly, or making them a...

Creating a marquee lookalike in Windows Store Apps

c#,windows-runtime,windows-store-apps,marquee

There are no Marquee controls in Windows Store Apps. I have managed to find code doing something similar to what you are trying to do. Go take a look at WPF Marquee Text Animation. If you play around with that code you should be able to get the wanted result...

How can I create a StorageFile object from URI?

javascript,html5,windows-runtime,windows-store-apps,winjs

I am afraid your only option is to download the file to local storage, and then go from there.

How to exit full screen mode for media element in windows 8.1 store app

c#,xaml,windows-store-apps

Modify your code like this : mediaSimple.IsFullWindow = !mediaSimple.IsFullWindow; ...

AccessViolationException in Windows.Media.SpeechSynthesis.SpeechSynthesizer constructor

c#,windows-runtime,windows-store-apps,sapi

I believe that your customer has bad data in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Speech\Voices\Tokens, which is where SAPI stores the information about what voices are installed on the system. Clearly, some keys are present (given that the code is trying to add a token from the registry key), but the values...

Enable drag/drop and reordering after long click on GridView control (XAML)

c#,xaml,windows-store-apps

After much fuss and chasing down events, I was able to get the intended effect on pen, mouse, and touch devices. The following code is not guaranteed to be the best way to accomplish the long click drag, but it is functioning on my devices with Windows 8.1. I encourage...

UnAuthorizedAccessException on StorageFolder.GetFolderFromPathAsync while having access through FilePicker

c#,windows-runtime,windows-store-apps,windows-10

Your app doesn't have access to the path. The permission to access the file is handled via the StorageFolder returned by the picker. Instead of this line to try to create a new StorageFolder from pickedFolder StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(pickedFolder.Path); Just use the pickedFolder itself: var pathFolderList = await...

Cropping Image with Xamlcropcontrol for UI and WriteableBitmapEx

c#,windows-store-apps,winrt-xaml,writeablebitmapex

You will have to use the WBX WinRT APIs for this. Looks like you are trying the WP / Silverlight methods. Try this: async Task<WriteableBitmap> LoadBitmap(string path) { Uri imageUri = new Uri(BaseUri, path); var bmp = await BitmapFactory.New(1, 1).FromContent(imageUri); return bmp; } Note it takes an URI. In your...