uwp-xaml

How to change background overlay of ContentDialog uwp

守給你的承諾、 提交于 2019-12-04 02:21:48
问题 I am developing UWP Win10 App using VS2015. I am using ContenDialog to show a Modal Window / Popup. I need to change the Background Overlay color of ContentDialog. How to do this. There is no option/property even in the inner Style too. I need to change the Overlay White Dim color to some other color like Blackish overlay/dim color etc... See the pic. 回答1: I think you need custom use control to have more control over the background. The default ContenDialog provide very bare bone setup and

[UWP][XAML] ListView child item not using full width

ⅰ亾dé卋堺 提交于 2019-12-03 21:50:25
问题 I'm trying to display a list of bound items. I've customized the datatemplate to be a grid and I want the right column (that has a fixed width) to stick to the right side of the screen, and the 1st column I want to fill the remaining space. Normally this works fine, but when I put this grid inside a ListView, the behavior seems to change. Below is my ListView code: <ListView x:Name="LView" Background="Green" Width="{Binding ElementName=ExtPropPage, Path=Width}" ItemsSource="{Binding

UWP - setting IsEnabled on NavigationViewItems

独自空忆成欢 提交于 2019-12-03 16:01:21
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="NavigationViewControl" CompactModeThresholdWidth="480" ExpandedModeThresholdWidth="635" OpenPaneLength

Name does not exist in the namespace

我只是一个虾纸丫 提交于 2019-12-03 15:16:04
I am working on a simple UWP project using data template binding in VS 2015. When ever I try to specify the type for the Datatemplate I get an error. XAML: <Page x:Name="RootPage" x:Class="Adaptive_News_Layout.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Adaptive_News_Layout" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" FontSize="22" > <SplitView x:Name="MySplitView" Grid.Row="1"

Override theme resource in the scope of a Page

谁说我不能喝 提交于 2019-12-03 08:27:26
I want to override a theme resource, specifically the SystemAccentColor , in the scope of a specific page. I have successfully done it in application wide scope. But I can't do it for a specific page. XAML in App.xaml (this works fine) <Application.Resources> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default"> <Color x:Key="SystemAccentColor">#862E2D</Color> <SolidColorBrush x:Key="SystemControlHighlightAccentBrush" Color="Black"/> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </Application.Resources> XAML in

Keep ListView.HeaderTemplate visible/static/sticky in UWP

三世轮回 提交于 2019-12-03 07:48:33
I need to keep the HeaderTemplate of a ListView visible at all times, but I don't know what to set, or what part of the ListView 's template to change to do that. What I currently have causes the header of the ListView to scroll off the top when scrolling down through items. How can I keep the header "row" of the ListView visible even when scrolling through the ListView 's items?? Here's my XAML: <ListView x:Name="permitResults" Grid.Row="1" AutomationProperties.AutomationId="PermitResults" AutomationProperties.Name="Permit Search Results" ItemsSource="{Binding Source={StaticResource

Changing value of a ThemeResource at runtime does not reflect in other views

Deadly 提交于 2019-12-03 01:47:39
I am using custom themedictionary in my UWP app. I change the value of a ThemeResource at runtime. This change is reflected only in the mainview and not the other views. Even if i create a new view after changing the resource's value the new view uses only the intial value of the resource. Is there anything I'm doing wrong? This is how I change my resource's value. (Application.Current.Resources["BackgroundBrush"] as SolidColorBrush).Color = Windows.UI.Colors.Black; My Secondary View's XAML: <Grid Background="{ThemeResource BackgroundBrush}"/> Even my main view has the same XAML. Here's the

How to get all Controls' ControlTemplates Programmatically?(UWP)

你说的曾经没有我的故事 提交于 2019-12-02 09:16:07
问题 Although I know I can get all ControlTemplates from MSDN.,it's not convenient enough. I tried to get controltemplates by adding a reference to the windows.winmd,then getting templates programmatically like WPF.but I got an Exception,then I looked up the windows.winmd,I found that the Control type didn't have a public constructor,maybe the private constructor caused this Exception. I also tried to get templates in a UWP App,but I had no classes to serialize and deserialize the ControlTemplate

Setter.Target give me an error with “RelativePanel.AlignHorizontalCenterWithPanel”

ε祈祈猫儿з 提交于 2019-12-02 06:02:15
I am develop an UWP app, and I am using Template10. I have an TextBlock , that in VisualStateNarrow I want it RelativePanel.AlignVerticalCenterWithPanel="True" and in NormalMinWidth I want RelativePanel.AlignHorizontalCenterWithPanel="True" but I can not do this! <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="AdaptiveVisualStateGroup"> <VisualState x:Name="VisualStateNarrow"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="{StaticResource NarrowMinWidth}"/> </VisualState.StateTriggers> <VisualState.Setters> <Setter Target="TextBlock.RelativePanel

Use strings in .resw File directly in XAML

孤者浪人 提交于 2019-12-02 05:47:19
问题 I know the usual way to reference localized strings from a .resw file would be like this: XAML: <Button x:Uid="ButtonUid" /> Resources.resw: ButtonUid.Content = "Hello World" But is it also possible to kind of do it like this: XAML (pseudo code): <Button Content = "$buttonLabel" /> Resources.resw: buttonLabel = "Hello World" The reason why I want to do it like in the second exapmle is because this is an app that I'm porting from iOS and Android to WP. I'd like to convert the iOS or Android