XAML


How to Fix Extended TitleBar Overlapping NavigationView PaneToggleButton

In UWP Apps, we some times extend our main view into title bar to get rid of Windows 10 default title bar. However if you are using NavigationView under extended title bar, you will find your PaneToggleButton overlapped by the title bar. And the user won't be able to click on the upper part of the button because it is where the title bar need to respond to window drag actions. This image shows …


Automatically Set Text Color on Accent Background in UWP

Windows 10 allows users to set accent color for the system, and in UWP apps, we usually honor those settings by using XAML pre-defined resource keys like {ThemeResource SystemControlBackgroundAccentBrush}. But regardless of how the user set default app mode to dark or light, when we apply text on accent colors, it may have some problems. For example, when the App is in light mode, the …


Windows Phone Runtime 8.1如何设置最小化的工具栏

以前在Silverlight Runtime下,要设置一个最小化(缩紧)的工具栏,给ApplicationBar设置Mode属性为Minimized就行 <shell:ApplicationBar IsMenuEnabled="False" Mode="Minimized"> 到了Windows Phone 8.1运行时下,这个Mode属性木有了。就算你不加任何按钮或菜单,在XAML设计器里起来是最小化了,运行时还是会展开的。比如这段代码: <Page.BottomAppBar> <CommandBar Background="#0072BC" Foreground="White" /> </Page.BottomAppBar> 在XAML设计器里的效果: 运行时的效果: 草草草草草。。。 查了下 …