FAQ Database Discussion Community


does not implement interface member IComponentConnector2

c#,windows-universal,windows-10
I tried to create a new Windows universal app (UWP) but new project seems to be broken. I use Visual studio 2015 RC (version 4.6.00076), .NET for Windows Store apps (4.5.1.0) How did i do ? I used this simple way : And next, i tried to build project without...

Setup ListView as a drop target for files on Windows 10 Universal Apps

c#,drag-and-drop,windows-universal
I have declared in my XAML the following element: <ListView Name='mPlaylist' AllowDrop='True' DragEnter='HandlePlaylist_DragEnter' Drop='HandlePlaylist_Drop' /> When I drag a file from Windows Explorer or the desktop onto my ListView using the mouse, the DragEnter handler is executed and I can set the AcceptedOperation member of the DragEventArgs to Link (and...

Can't deploy universal app to phone with Windows 10 Mobile Tech Preview

deployment,win-universal-app,windows-universal,windows-10,windows-10-mobile
I have a developer unlocked Lumia 635 just yesterday updated to Windows 10 Mobile Technical Preview (OS version: 10.0.12562.84). After creating "Blank App (Windows Universal)" targeting Windows Phone 10 in Visual Studio 2015 RC and tried to deploy it to the device (and have changed configuration to ARM for that...

Windows 8.1 Universal App References

c#,windows-phone-8,windows-universal
I have a windows 8.1 universal app. One part is desktop/tablet app and one is Windows phone. I have been downloading all external libraries via nugget into the Windows 8.1 and now my Windows Phone doesn't recognize it. How can i reference it all under one "umbrella" or point the...

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

windows-store-apps,appbar,windows-universal
The Windows universal app guidance for app bars suggests you include app bar icons are 100 scale (32x32), 140 scale (45x45) and 240 scale (77x77) icons. The issue is that when I include a 240 scale I get the following warning when I compile: Invalid qualifier: SCALE-240 It seems to...

GetCustomAttributes for an enum value return an empty Array

c#,enums,custom-attributes,windows-universal,windows-10
I'm currently working on upgrading a windows 8.1 universal app to a windows 10 UWP app. There is a part of code that was working perfectly before that doesn't work anymore in my Windows 10 UWP app. I have an enum that looks like this : public enum EStaticFile {...

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

Application configuration files for Windows Universal app

windows-phone-8,windows-store-apps,windows-universal
I have developed a windows universal app 8.1 for tablets and phones. Is there any equivalent of App.config file what we used to have in desktop applications in win 8.1 tablets and phones ? Searching over the net revealed nothing. Thanks and Regards, Saurav...

How to set data context of ViewModela View's xaml?

c#,listview,design-patterns,mvvm,windows-universal
I'm trying to set the data context of a View to the list contained in it's ViewModel. But when I've tested the current set up, it seems the data context between the ViewModel and View is set incorrectly. To debug this issue I set up a message box in the...

How do I write a Windows 10 universal class library that references native code?

winapi,native-code,windows-universal
I have a C# class library that references and wraps Win32 native methods. But I can't seem to port this code over to a newer "universal" C# class library. What do I need to do in order to properly marshal these native methods?

How to change Views using the NavigateToPageAction?

c#,xaml,mvvm,eventtrigger,windows-universal
I've set up a NavigateToPageAction to navigate to a new View on an AppBarButton click, but the second event trigger I've set up doesn't navigate to the specified View, "ViewSubjectGradePage" The first trigger works when navigating to "AboutPage" which is identical, so not sure why it doesn't work the same...

UAP file extensions

windows-universal,windows-10
My package.appxmanifest editor wont open in the designer in the new VS 2015 RC so I'm forced to edit it the old fashioned way. How can I add file extensions to a windows universal app(windows 10) like this one from an 8.1 app: <Extensions> <Extension Category="windows.fileTypeAssociation"> <FileTypeAssociation Name="mp3"> <DisplayName>mp3</DisplayName> <SupportedFileTypes>...

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

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

Window.Current.Bounds throws HRESULT E_FAIL has been returned from a call to a COM component

c#,windows-phone-8.1,screen,dimensions,windows-universal
I'm building a Windows universal SDK that will retrieve user and device dimensions and I'm trying to get the screen size of the device from a non XAML (or related) class. When trying to get the bounds I receive "HRESULT E_FAIL has been returned from a call to a COM...

Is thre an API to access the Music used in Xbox Music from my App?

onedrive,windows-universal,xbox-music
I have a Program that uses the Music of the User. Currently the User just can open the Files to use these in the Program. But on smal devices the user maybe stores his music in the cloud and uses streaming. Is threr a way to acces his music from...

Thread safe async file writе with FileIO.ReadTextAsync

.net,windows-phone-8,async-await,windows-universal
How I can use FileIO.ReadTextAsync in windows universal apps so that it will be thread safe? Because trying something similar like lock(lockObject) { var data = await ReadTextAsync(fileName); } but using await in lock is not supported =(....

Notify user when app is closed with no cloud service

c#,azure,push-notification,visual-studio-2005,windows-universal
Is there any similar way to "Push Notification" but without the need to connect to a cloud service like azure? I want to notify user when countdown in my app is less than a day left but also I want to be able to notify him while app is closed....

Background color part of textbox

c#,xaml,windows-phone-8.1,windows-8.1,windows-universal
I've been trying to set a background color to a part of a textblock. Since there is no function to this with in the TextBlock itself I figured I should be adding inlines. However the inline objects (Run, Span, e.g) have a private background field that gets its value from...

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

Windows Universal app - no “Any CPU” configuration for Windows 10?

win-universal-app,visual-studio-2015,windows-universal,windows-10
I'm updating Windows Universal project that was created with Windows Software Development Kit (SDK) for Windows 10 Technical Preview to Windows Software Development Kit (SDK) for Windows 10 Insider Preview: So the solution file's changes is only VisualStudioVersion from 14.0.22609.0 to 14.0.22823.1. The project file's changes are also minor: <TargetPlatformVersion>10.0.10030.0</TargetPlatformVersion>...

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

download html content from a page in webview for windows phone 8.1

html,dom,webview,windows-phone-8.1,windows-universal
I am working on windows phone 8.1 runtime universal app and using webview to go to page. I want to be able to download the HTML on the page into a string so I can use t in my app. I have used these links for help but to no...

C# (windows app 8.1) HMAC SHA256 differs from other languages (too short?)

c#,windows-phone-8,windows-universal
I have a method that generates a checksum using HMAC SHA256 in both Ruby and Objective-C and I'm trying to port it to C#. It seems like the C# implementation is creating a hashed string that is too short: The Ruby version: message = "POSThttp://api.somewhere.com/eventsmy_data1423778684" key = "ABC123" checksum =...

Connecting Microsoft Band SDK Preview to C++ project

windows-runtime,windows-phone,c++-cx,windows-universal,microsoft-band
I have just downloaded the Microsoft Band SDK Preview and trying to connect it to my C++/CX Windows Universal App project. Nuget gives me an error below, any way I could use the SDK preview from C++ code? Install-Package : Could not install package 'Microsoft.Band 1.3.10219-preview'. You are trying to...

Getting Location in Windows 10 Universal App

c#,win-universal-app,windows-universal,windows-10
In the new Windows 10 documentation, it says that before getting a user's location that you should use Geolocator.RequestAccessAsync(). However, the method doesn't seem to be available. The only options I can use are are "Geolocator.Equals" and "Geolocator.ReferenceEqual". When I try to get the location without using the RequestAccessAsync. I...

How to implement the Facebook Api in Windows Universal apps?

c#,facebook,mvvm,facebook-sharer,windows-universal
I'm trying to add functionality to allow sharing a screen shot of the app screen, using the Facebook sharer facility. But I can't find any relevant sources to set this up on Windows Universal. Does anyone know the steps involved in setting up the Facebook Api in a Windows Universal...

Windows 10 xaml Controls Centre Screen

xaml,user-interface,windows-universal,windows-10
I'm working on an app for windows 10. I've previously worked on a handful of Windows 7 applications and I'm trying to get use to the many differences now. I'm trying my luck at a universal app, and I'm wanting to centre a handful of controls so that no matter...

How to resolve System.Reflection.TargetInvocationException' error?

c#,viewmodel,mvvm-light,ioc-container,windows-universal
I'm using the MVVM Light libraries in my application which provides an Ioc container, called the ViewModelLocator. But when I set up a second property in the locator for a new View Model, I get a System.Reflection.TargetInvocationException I debugged this by looking at the inner exception, and it seems that...

Is there a correct/recommended way of detecting my UWP app I'm running on a Phone?

javascript,winjs,windows-universal
Trying out Windows Universal apps with JavaScript I noticed the WinJS.Utilities.isPhone property is no longer available, which makes sense since there would be no reason to ask for that at runtime. I do want to know just for testing purposes if there is a proper way of detecting the device...

Visual Studio 2015, Nuget and “same key has already been added.”

c#,windows-phone-8.1,nuget,visual-studio-2015,windows-universal
I have Visual Studio 2015 RC. When I open a console app or a Windows Phone 8 Silverlight project, everything works fine, I can use Nuget without problems. When I open a Universal App project (Windows 8.1 + Windows Phone 8.1), Nuget breaks. When I open the Nuget console, I...

Remote debugging on Surface Pro 3

remote-debugging,visual-studio-2015,windows-universal,windows-10,sideloading
I've installed x64 version of remote debugging components for Visual Studio 2015 on my Surface Pro 3 with Intel Core i3 CPU and recently updated to Windows 10 Pro Insider Preview x64. When I'm trying to debug remotely simple universal application from Visual Studio 2015 RC (development machine runs Windows...

Binding to ComboBox displays Model name instead of property contents

c#,data-binding,combobox,windows-universal
I've set up the binding for a combo box using a property in the ViewModel. But when I debug the app on a device, the contents of the combo box is just the Model name for each index like LC_Points.Model.Grade. To debug this issue, I've gone through the following checks:...

Windows.Web.Http.HttpClient with gzip

windows-universal,windows-10
How can you use Windows.Web.Http.HttpClient with gzip? Currently focusing on Windows 10 application....

Send a Toast Notification from windows universal Application

windows-runtime,windows-phone,windows-store-apps,windows-phone-8.1,windows-universal
I am trying to find a way to send a toast notification from a windows universal application. The Azure documentation does mention a way to do this from a Console Application. This does not meet my use case though, where I want to send toast notifications from a windows universal...

How to set Node.js Windows Universal app as startup app on Windows 10 IOT Core

node.js,windows-universal,raspberry-pi2,windows-10-iot-core
I have created the sample Hello, World Node.js Windows Universal Sample from the Microsoft IOT Github page, but now I want to set this background app to start. I know I'm supposed to use iotstartup, but what is my app name? All I see is this: [10.10.xx.xx]: PS C:\> iotstartup...

How to migrate a Windows Universal App to Portable Library Project?

c#,portable-class-library,windows-universal
I have previously developed a Windows Universal App. I would like to migrate all the non-platform specific code to place in a portable class library project for further development.How to achieve this? In the Windows Universal App there are some backend C# code controlling UI contents and manipulate the data...

How to use VisualStateManager instead of DataTrigger to implement dynamic binding?

c#,mvvm,binding,visualstatemanager,windows-universal
I've tried to implement DataTrigger, to perform dynamic binding based on which toggle button is toggled in a View. But after searching on the issue, DataTrigger in WinRT? it seems this is not available in Windows Universal apps, and VisualStateManager should be used instead. My question is, how can I...

Binding issue in UserControl contained in a ListView

c#,xaml,data-binding,datacontext,windows-universal
My app structure is as follows: MainPage.xaml has a ListView that has it's ItemSource set to a CollectionViewSource which is populated in code-behind: MainPage.xaml <Page.Resources> ... <CollectionViewSource x:Key="src" IsSourceGrouped="True" /> ... </Page.Resources> <Grid> ... <ListView ItemsSource="{Binding Source={StaticResource src}}" SelectionMode="None" ItemTemplate="{StaticResource processTemplate}" ItemContainerStyle="{StaticResource ListViewItemStyle}"> <ListView.GroupStyle> <GroupStyle...

MediaCapture VideoStabilization fails with 0xC00D4A3E

c#,windows-store-apps,windows-universal,windows-10
I'm working on a video recording app that supports the VideoStabilization effect, but when I start recording, I receive the following through the MediaCapture.Failed event almost instantly: The sample allocator is currently empty, due to outstanding requests. (0xC00D4A3E) It only happens when I use the recommended configuration from the effect,...

Windows Universal App SQLlite in Portable DLL

windows-phone-8.1,windows-universal
My project structure is defined like this: LIB Com basic communication, (requests and responses) LIB Com.BackgroundTask background task that will fetch new messages from server LIB Com.Mediator background logic that will handle every exchange of information and interaction between Com and the ViewModel LIB Model all Models for the Project,...

is this correct for DK V1.0.0?

windows-universal
console.print('<Text>'> prints text? console.printVar(<Variable Name>) prints variable? Lorem ipsum dolor sit amet...

Fit element width of current screensize in an universal app

xaml,windows-phone,winrt-xaml,windows-universal,windows-10
I'm trying to develop an app for Windows 10. But with the all new screensizing I can't seem to figure out how to get an element to fit to the current size of a device screen. For example I want a TextBlock to fit the width of the window if...

What are the Windows 10 universal app deployment methods?

win-universal-app,windows-universal,windows-10
I'm trying to evaluate Windows 10 universal app platform for future development, and trying to understand how Windows 10 universal apps can be deployed to Windows 10 computers. Are they can be deployed only via the Windows Store, just like Windows 8 Metro apps? Or can they be deployed via...

Windows Universal App maintain open WebSocket

c#,.net,websocket,windows-phone,windows-universal
How to have a WebSocket open on Windows Universal App? Can I have my WebSocket be open even when app is closed?

How to store data / use databases with Windows Universal Apps (C#, XAML)

c#,database,win-universal-app,windows-universal
I'm looking into developing Universal Windows Applications with C# and XAML. If I were to design an application to log user's meals (nutrition log app) I'd need a database of foods (nutrition data - protein, fat etc.), user's data (age, weight, height, goals, calorie needs etc.) and meals (time, foods...

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

UWP: styling the window buttons does not work on the close button

c#,.net,win-universal-app,windows-universal
in a Windows 10 UWP we can style the title bar and window buttons (windows chrome). However this does not work on the close button when use hover or click onto them. Take the following snippet: Color PrimaryColor = Color.FromArgb( 0xFF, 0xFF, 0x00, 0x00 ); Color ContrastColor = Color.FromArgb( 0xFF,...

How to set TextBlock text property to a string resource?

c#,string,xaml,windows-universal,uid
I've been following this tutorial Using String resources (xaml) to set up string resources, in a Windows Universal project. But even though I've set the Uid of the text block to the string resource name, the string contents aren't displayed in the text block during testing the app. Does anyone...

Calling a rest API windows 10 IoT with a Raspberri pi

c#,windows-universal,iot,windows-10,raspberry-pi2
I'm trying to do something as simple as calling a REST API using an universal app for windows 10 IoT but I can't find a way to do it. Normally I would use: private XElement ImportData(string sourceUrl) { WebClient wc = new WebClient(); String source = wc.DownloadString(sourceUrl); return XElement.Parse(source, LoadOptions.None);...

Can't get WinAppDeployCmd for Appx deployment to work

windows-phone,win-universal-app,windows-universal,windows-10
During the App Packaging and Deployment for Universal Windows Apps presentation (fast forward to 00:36:00) one specific command line utility - WinAppDeployCmd - was used for deployment Windows 10 Universal application to the phone running Windows 10 Mobile. This utility could be found here: "c:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" But every...