windows-10-universal

How to set the window's size in a Universal app?

倖福魔咒の 提交于 2019-12-06 06:43:13
I use C# and XAML, and my main page begins like this : <Page x:Class="MyApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="754" Width="1018" MaxHeight="754" MaxWidth="1018" MinHeight="754" MinWidth="1018" mc:Ignorable="d"> <Grid> (...) </Grid> But the windows is always maximized when I start the app. Only the grid respects the size mentionned in

UWP: BrightnessOverride StartOverride logic

孤者浪人 提交于 2019-12-06 05:51:48
问题 Does anybody know StartOverride method logic? From documentation: The request to start overriding does not mean that the screen brightness level always changes to match the specified override brightness level. It's still up to the system to decide whether or not to honor this override request. I've wrote simple method to debug brightness changes: protected override void ApplyBrightness(double brightness) { var brightnessOverride = BrightnessOverride.GetForCurrentView(); Debug.WriteLine($"Try

FormatMessage is not supported for this application type

岁酱吖の 提交于 2019-12-06 05:45:43
When running app certification on my app, I'm getting this error from supported apis. API FormatMessage in api-ms-win-core-localization-l1-2-0.dll is not supported for this application type. System.Diagnostics.Tracing.dll calls this API. Is there something obvious that I'm missing? I'm not using anything from that namespace directly. If this is a 3rd party library calling something in System.Diagnostics.Tracing, is there a way to track down which one? I'm not referencing System.Diagnostics.Tracing directly in my app. For my app, I will get exactly this error if I unzip the .appxupload and use

In universal windows apps, how to change the background color of a button using xaml and databinding if a property in the view model changes

杀马特。学长 韩版系。学妹 提交于 2019-12-06 04:32:21
问题 Universal windows apps don't support data triggers. Without data triggers, how can I change the background color of a button using xaml and data binding only when a boolean property in the view model changes? For example given this XAML: <StackPanel> <Button Name="ButtonA" Click="ButtonA_Click" Content="A" /> <Button Name="ButtonB" Click="ButtonB_Click" Content="B" /> <Button Name="ButtonC" Click="ButtonC_Click" Content="C" /> </StackPanel> with this code behind private void ButtonA_Click

No installed components were detected. Cannot resolve TargetName HighContrastBorder - UWP Windows 10

帅比萌擦擦* 提交于 2019-12-06 03:02:27
问题 My CommandBar has its IsOpen property set to true in XAML and therefore the is text for each button is visible as I want the descriptions to remain visible. When I click on ellipses button, it hides the text and the second time I click on it, I get the following error: No installed components were detected. Cannot resolve TargetName HighContrastBorder . There is something awkward going on with the UI and maybe it's related to this but I can't figure out what or why: As you can see my buttons'

ContentDialog not aligning to center on UWP

橙三吉。 提交于 2019-12-06 02:41:16
From what I know, ContentDialog 's default behavior should be to have it centered on PC and aligned to top on mobile, but in my case I have it aligned to top even on PC and I don't understand what's going on. I'm creating it using code-behind, and this is a snippet of the code that I'm using: // Creates the password box var passwordBox = new PasswordBox {IsPasswordRevealButtonEnabled = true, Margin = new Thickness(5)}; // Creates the StackPanel with the content var contentPanel = new StackPanel(); contentPanel.Children.Add(new TextBlock { Text = "Insert your password to access the application"

Are AppId and Package Id identical?

跟風遠走 提交于 2019-12-05 23:16:49
问题 I want to open Windows Store of my current application (so the user can rate/review out app). In doing so, I need to get the App ID. However, I come across this article in SO that says CurrentApp.AppId takes a lot of time, and offer Package ID as substitution. I have never released a app on Windows Store before, and cannot test it now without a released/published app on Windows Store. Can anyone help me confirm about the following two lines of code? //var appId = CurrentApp.AppId.ToString();

File Not Found Exception in Universal Windows Platform

巧了我就是萌 提交于 2019-12-05 21:12:59
Plase, help me, I have the following line of code in C# inside some async method and I use Universal Windows Platform (Windows 10 SDK 10.0.14393): var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/HamburgerMenuItems.json")); The problem is this exception: System.IO.FileNotFoundException occurred in mscorlib.ni.dll. Visual Studio shows me, that the file is inside the Assets folder and the file is ok, because it opens normally (it is very short json file). What can be the problem or what is solution for this problem? this image shows, that the file is inside

WebRTC for UWP, new RTCPeerConnection() doesn't complete execution

跟風遠走 提交于 2019-12-05 21:07:49
I’m trying to create a Universal Windows Platform application that uses WebRTC, but my code never executes past the first new RTCPeerConnection. I have been looking at the open source project WebRTC for UWP ( blog post with links to git repos) and managed to build and run the ChatterBox VoIP client example. Since I am new to both UWP programming and WebRTC (and .NET, C# and Windows programming in general) the examples I have been looking at in the repos mentioned above have been much too complex for me to follow. To start with something simpler, I want to recreate the WebRTC.org minimalistic

Error: DEP0001, HRESULT: 0x80073CF9 when deploying UWP app to Phone

喜你入骨 提交于 2019-12-05 19:19:08
Despite the alike existing threads here on SO, my problem is somehow different, I have an application that I made, I deploy it, works fine. I copy the same application solution, make some changes on it to create an other application that have almost the same logic as the first one (can't re-code everything from scratch), deploy it, and I receive this : Severity Code Description Project File Line Suppression State Error Error : DEP0001 : Unexpected Error: Install failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CF9) MyApplication I believe this is cause by the fact