win-universal-app

UWP - ImageBrush full path to ImageSource

非 Y 不嫁゛ 提交于 2019-12-13 19:45:23
问题 I have an ellipse and I want to fill it with image. And I would like to set full path to the image to ImageSource property of ImageBrush . But I wasn't able to accomplish it. I've tried to add: C:/Users/someuser/Pictures/untitled.png C:\\Users\\someuser\\Pictures\\untitled.png which came from FilePicker C:\Users\misko\Pictures\untitled.png . But non of this works. Can you please explain to me how to properly set full path? 回答1: You have to open the file first using FilePicker if (file != null

Change system clock by ProcessLauncher on uwp

别说谁变了你拦得住时间么 提交于 2019-12-13 19:41:15
问题 I'm trying to run a powershell script on raspberry (uwp) to change the system clock by c#. Running the code below throw an exception 'System.UnauthorizedAccessException'. await ProcessLauncher.RunToCompletionAsync(..."set-date.ps1", date.ToString()); set-date.ps1 file content: function Set-Time ([string]$dateTime) { $newDate = Get-Date $dateTime Set-Date $newDate } I'm trying to find other way to do it or try to run ProcessLauncher inside impersonator, but i don't know how to do it on uwp.

template 10: declaring a new button in hamburger navigation and navigating to its page

你。 提交于 2019-12-13 19:31:39
问题 I am kind of beginner in UWP Platform and I am building an app using template 10. I have used GridView for a particular page, but the problem is that the GridView shows its borders when you hover over it or select its item. Like this: I want the border not to show up whenever the user hovers over it or selects a GridView item. My XAML Code is: <Page x:Class="Sample.Views.Category" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx

Windows 10 IOT serial - Working on RP2 but read serial data incomplete

浪子不回头ぞ 提交于 2019-12-13 19:13:45
问题 So I have been experimenting with the IOT serial sample and RP2 since the october release opened up the serial pins. Im using the windows iot serial sample. Have a few issues i cant figure out. The read data seems incomplete. I have an arduino outputting an analog input reading through the serial at 9600 baud. On the windows universial app, ill read one complete line then one incomplete line. For example: if the arduiono is outputting a value of "2.25", the app will read one line 2.25 then

windows 10 exceptions not including line numbers

走远了吗. 提交于 2019-12-13 18:51:43
问题 I have a Windows 10 Universal App that does not include line numbers in the Exception objects .ToString() method. If I have a method like private void ThrowException() { try { throw new Exception("Test"); } catch (Exception e) { Debug.WriteLine(ex.ToString()); } } When I check the output, I don't see the line number where there exception was thrown. I added a Post Build event to the project: xcopy $(ProjectDir)$(OutDir)*.pdb $(ProjectDir)$(OutDir)AppX\*.pdb The pdb file is in the Debug folder

Prevent a ScrollViewer's scrolling conditionally

独自空忆成欢 提交于 2019-12-13 16:27:18
问题 Is there any way to not only be notified of a ScrollViewer 's scroll, but to be able to prevent it. Something like a ScrollChanging event so I can set e.Cancel to true ? (I don't want to disable scrolling, nor do I want to implement it myself because it seems impossible to get the ScrollBar 's events to detect a user dragging them. At least in UWP .) The problem is that ScrollViewer_PointerWheelChanged isn't raised when it scrolls. Only when it doesn't have any need to scroll does it fire. 来源

UWP render 3D model in a

十年热恋 提交于 2019-12-13 16:18:29
问题 I'm writing a C# Universal Windows Application that loads a model from a .obj file and I would like to render that model so that the user can rotate it and scale it. Is there a way to render it in the app? Preferably in the same window? Something like the Map control, it's wrapped inside the app but still interactive. 回答1: I found this MSDN article for Windows 8.1 phone that tells us to use PlaneProjection. <StackPanel.Projection> <PlaneProjection RotationX="-35" RotationY="-35" RotationZ="15

Symbols for “ntdll.dll” could not be downloaded from Microsoft Symbol Servers

走远了吗. 提交于 2019-12-13 14:22:43
问题 I am trying to port my Windows Phone 8 app to Windows 10. I am able to build my app. When I try to deploy my app in Release x86 on a Mobile emulator, it fails & gives the following msg: Symbols for ntdll.dll could not be downloaded from Microsoft Symbol Servers. Exception string and call stacks may not work correctly. Make sure you have network connection and try again Even though I am trying to run my app in Release mode, I am not sure why VS-2015 is tyring to download these debugging

Inheritance impossible in Windows Runtime Component?

こ雲淡風輕ζ 提交于 2019-12-13 14:11:59
问题 Scenario: I have 3 classes (A,B,C) in my Windows Runtime Component project. class A{} public sealed class B : A {} public sealed class C : A {} On compiling the above code, I get the following error : "Inconsistent accessibility: base class 'A' is less accessible than class 'C'." If I make class A public, it gives a compile error : "Exporting unsealed types is not supported. Please mark type 'MyProject.A' as sealed." But now, if I make A as sealed, then B and C cannot inherit from it.

How to use C++ class in Windows 10 C# universal app? [closed]

故事扮演 提交于 2019-12-13 13:12:22
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I want to execute a method from cpp class in my Windows 10 C# Universal app. As i'm a newbie in Windows app development and C#, so i can use some code to understand the method. 回答1: You need to: 1- Create a new Windows Universal Runtime Component DLL, using C++/CX 2- Add a new ref