uwp-xaml

How to customize the application title bar for a UWP page

拈花ヽ惹草 提交于 2019-12-14 03:42:15
问题 I am trying to set the application title bar of a page visibile all the time for a UWP page and also disable the restore button, but I am not finding anything related to this. All i could do was to change the color of the application title bar having a code like below public MainPage() { this.InitializeComponent(); ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen; ApplicationView.GetForCurrentView().Title = "TEST"; ApplicationViewTitleBar titleBar =

How to open TabTip keyboard in a UWP app in desktop mode on button click

情到浓时终转凉″ 提交于 2019-12-14 00:46:13
问题 I am currently working in a UWP application. I have a situation where I need to open the taptip keyboard. The device needs to be in desktop mode and the keyboard should open on a button click. Is there any way I can achieve this functionality? I know it works fine in tablet mode when a text box gets focus but I need to get it done in desktop mode and on a button click. I know it can be done from a console application using System.Diagnostics.Process but I need a way around for uwp app. 回答1:

UWP - setting IsEnabled on NavigationViewItems

非 Y 不嫁゛ 提交于 2019-12-13 11:47:32
问题 I have a UWP app with a NavigationView control. The navigation items are created by setting MenuItemsSource in the XAML to a collection of objects of type NavigationViewElement . <NavigationView Style="{StaticResource MainPageNavControlStyle}" HeaderTemplate="{StaticResource MainPageNavHeaderTemplate}" MenuItemsSource="{Binding NavigationViewElements}" MenuItemContainerStyleSelector="{StaticResource NavStyleSelector}" MenuItemTemplateSelector="{StaticResource NavItemTemplateSelector}" x:Name=

how to make a contractable stackpanel in Xaml

别说谁变了你拦得住时间么 提交于 2019-12-13 07:21:38
问题 My idea is fairly simple and I've seen it many places. I want to be able to expand and contract a list of items based on a click on a button. ex listitem 1 listitem 2 subList item 1 subList item 2 listItem 3 simply click Listitem 2 and the sublistitems should disapear. click it again or any other listitem and the sublist item belonging to that listitem should reappear. here is what I've done so far(Doesn't work) Channels.Xaml: <UserControl x:Class="InternetRadio.RadioChannels" xmlns="http:/

How to scale a windows universal desktop app programatically

跟風遠走 提交于 2019-12-13 07:03:09
问题 The default scale factor in desktop is 1 but I want to apply an scale factor of 1.75 to a desktop application. I don´t mean the app bounds (that´s easy) but the scale applied to all visual elements, like mobile version does on devices. Is there any way to achieve this globally? 来源: https://stackoverflow.com/questions/40033649/how-to-scale-a-windows-universal-desktop-app-programatically

How to get the value of advanced power settings

核能气质少年 提交于 2019-12-13 06:29:45
问题 I try to read/get those advanced settings values such as Put the computer to sleep on my UWP application and follow this article How to get the value of advanced power settings but in UWP it is not working because the example is only for Windows 8.1 and WPF. Anybody have tried this kind of features in their application? My goal only for this is to get the values from the corresponding settings. 回答1: I don't think it's easily achievable. There's no out of the box API exposed to retrieve such

VisualState commonState doesn´t work xaml

不打扰是莪最后的温柔 提交于 2019-12-13 05:59:05
问题 I have this XAML view. The VisualStateGroups for the visual triggers works fine, but the VisualStateGroup for the common states doesn't. I try assign to a rectangle in the beginning and then neither work. In other views this works fine .. :( <view:NavigationStoredPage.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Styles/ResponsiveStyles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </view:NavigationStoredPage

How can I register only numbers in TextBox?(i dont have KeyPress event)

匆匆过客 提交于 2019-12-13 05:05:28
问题 I am trying to allow to register only numbers in TextBox, C# UWP XAML and i dont have the KeyPress Event what should i do? The WinForms equivalent of what I want to do is this: private void txtbox1_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar)) { e.Handled = true; } } 回答1: You can use KeyDown and KeyUp events. I tested this code on UWP app on Windows 10 OS. Working fine. <TextBox InputScope="NumberFullWidth" KeyDown="TextBox_KeyDown"

How to solve error of “returned exit code 1” while building UWP xamarin based app in Visual Studio?

佐手、 提交于 2019-12-13 03:50:15
问题 I am facing following error while publishing my UWP Xamarin based app on Windows Store. Package acceptance validation error: This package wasn't built for submission to the Microsoft Store. Make sure you're uploading a Release build with the .NET Native tool chain enabled. To remove "Windows Store" error, I have made following changes in my project After this it start another error as following while building project: 1: Error: NUTC1056:Internal Compiler Error: 0x8000ffff. Error encountered

How to Add Grid to ControlTemplate in UWP C#

人盡茶涼 提交于 2019-12-13 03:06:21
问题 I want add grid to ControlTemplate using C# in UWP application For example I have XAML code like: <ControlTemplate TargetType="HyperlinkButton"> <Grid Name="RootGrid"> <VisualStateManager.VisualStateGroups> <VisualStateGroup Name="CommonStates"> <VisualState Name="Normal"/> <VisualState Name="PointerOver"> <Storyboard> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <ContentPresenter Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw"