template10

Template 10 HamburgerMenu and PageHeader background color

瘦欲@ 提交于 2020-01-16 08:16:17
问题 Using the Live Property Explorer I can see the background colour of the HamburgerMenu control is DimGray or #FF2B2B2B depending on the Light/Dark theme selection but where do those colours inherit their value from please? I would like to use those same colours for the PageHeader background colour rather than the CustomColor (which is SteelBlue by default in the template). In the Custom.xaml resource dictionary, if I comment out the style targeting the PageHeader control in the "Light"

UWP Template10 Hide hamburger button when menu is open

▼魔方 西西 提交于 2020-01-04 06:51:10
问题 I want to hide hamburger menu button automatically in order to display menu from the top to the bottom of the page. For this purpose I tried to bind HamburgerButtonVisibility to IsPaneOpen property: <controls:HamburgerMenu x:Name="Menu" VisualStateNarrowMinWidth="0" HamburgerBackground="White" HamburgerForeground="Black" NavAreaBackground="{StaticResource MenuBackground}" HamburgerButtonVisibility="{x:Bind Menu.IsOpen, Mode=OneWay, Converter={StaticResource ReverseBooleanToVisibilityConverter

Display image depending on application theme

元气小坏坏 提交于 2019-12-25 18:25:01
问题 I am develop an UWP app, and I am using Template 10. I have a black image and a white image. I want when the user choose dark theme, show the white image, and when the user choose light theme show the black image, exemple: if(dark theme) { white image; } else { black image; } 回答1: You can get current RequestedTheme using this.RequestedTheme and then compare it with ElementTheme.Light or ElementTheme.Dark Method 1 if (this.RequestedTheme == ElementTheme.Light) BackgroundImage.Source = new

Special characters (like Ü,Ä,Ö) are not correctly displayed at runtime in case of using Template10

↘锁芯ラ 提交于 2019-12-24 00:59:44
问题 Have an issue by using the Template10 for UWP apps. If i want to display special characters at design time everything seems to be ok. At runtime special characters would not be displayed correctly as you can see in screenshots. <!-- page header --> <controls:PageHeader Content="Übersicht"> <controls:PageHeader.SecondaryCommands> <AppBarButton Click="{x:Bind ViewModel.GotoSettings}" Label="Settings" /> <AppBarButton Click="{x:Bind ViewModel.GotoPrivacy}" Label="Privacy" /> <AppBarButton Click=

UWP Template 10 create a dynamic hamburgermenu

老子叫甜甜 提交于 2019-12-23 20:06:17
问题 I'm pretty noob with UWP stuff. I'm trying to create dynamic hamburger menu. I was able to create PrimaryButtons element, and binding it in XAML worked as espected: var loginButton = new HamburgerButtonInfo(); loginButton.ClearHistory = true; loginButton.PageParameter = ""; loginButton.PageType = typeof(Views.Login); var stackPanel = new StackPanel { Orientation = Orientation.Horizontal }; stackPanel.Children.Add(new SymbolIcon { Symbol = Symbol.Contact, Width = 48, Height = 48 }); stackPanel

UWP Template 10 and Service Dendency Injection (MVVM) not WPF

时光总嘲笑我的痴心妄想 提交于 2019-12-23 15:32:57
问题 I have spent over two weeks searching google, bing, stack overflow, and msdn docs trying to figure out how to do a proper dependency injection for a mobile app that I am developing. To be clear, I do DI every day in web apps. I do not need a crash course on what, who, and why DI is important. I know it is, and am always embracing it. What I need to understand is how this works in a mobile app world, and in particular a UWP Template 10 Mobile app. From my past, in a .net/Asp app I can

UWP Template 10 and Service Dendency Injection (MVVM) not WPF

痞子三分冷 提交于 2019-12-23 15:27:06
问题 I have spent over two weeks searching google, bing, stack overflow, and msdn docs trying to figure out how to do a proper dependency injection for a mobile app that I am developing. To be clear, I do DI every day in web apps. I do not need a crash course on what, who, and why DI is important. I know it is, and am always embracing it. What I need to understand is how this works in a mobile app world, and in particular a UWP Template 10 Mobile app. From my past, in a .net/Asp app I can

How to show the UWP ShellBackButton as a button in Template10?

本秂侑毒 提交于 2019-12-23 04:59:15
问题 I need to show the UWP ShellBackButton as a button in my user control in Template10. The ShellBackButton is the back button on top left in the application but I need to show this as a button in the main screen so the user can click on it. I have researched this, but could not find how to do this. There a property in App.xaml.cs to show the button on top left, that is ShowShellBackButton and I want to have this as a button in my user control view. 回答1: As from the comments, i thought it's

Adding BasedOn Style on App.xaml is crashing on App() { InitializeComponent(); }

荒凉一梦 提交于 2019-12-21 02:08:46
问题 Adapting an project to Template10, I go into inherited styles in App.xaml are crashing. It looks like Template10 , doesn´t support inherited or extended styles. I was trying to extend SubTitleStyle from TitleStyle but I get an COM exceptions on GetXamlType in XamlTypeInfo.g.cs My App.xaml.cs sealed partial class App : BootStrapper { public App() { InitializeComponent(); } public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args) { NavigationService.Navigate(typeof

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

北战南征 提交于 2019-12-20 03:52:21
问题 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}"/> <