material-design-in-xaml

How make MaterialDesignInXamlToolkit Custom Color Theme?

眉间皱痕 提交于 2019-12-10 10:11:00
问题 I have to make a personal colot theme with custom accent and primary color palette. Is possible to create a resource dictonary in my project with new custom palette? Can you show me a sample? Best Regards Franco 回答1: To create a custom palette, define your brushes manually in your App.xaml e.g.: <!-- primary hues --> <SolidColorBrush x:Key="PrimaryHueLightBrush" Color="LightBlue"/> <SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="Black"/> <SolidColorBrush x:Key=

Material Design In XAML override style not working

强颜欢笑 提交于 2019-12-08 05:19:29
I'm having difficulties overriding a very simple TextBox style using the MaterialDesignInXamlToolkit. As far as I can see I've followed the override instructions to the letter: App.xaml <Application x:Class="WpfApp1.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />

Material Design In XAML override style not working

有些话、适合烂在心里 提交于 2019-12-08 04:37:49
问题 I'm having difficulties overriding a very simple TextBox style using the MaterialDesignInXamlToolkit. As far as I can see I've followed the override instructions to the letter: App.xaml <Application x:Class="WpfApp1.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack:/

Set 24-hour time format for TimePicker

放肆的年华 提交于 2019-12-08 02:48:03
问题 I'm building an MVVM Light WPF app in Visual Studio 2015 using the Material Design in XAML Toolkit. Here's the TimePicker control: <materialDesign:TimePicker Is24Hours="True" /> Here's what the control looks like when you click it: Note that it shows the time in 24-hour format correctly. However, when you select that time and return to the field, it displays it as non-24-hour time, with AM/PM: Is there any way to force the control to display the time in 24-hour format? Thanks. 回答1: As of 1.5

How to add personal icons in MaterialDesignInXamlToolkit?

孤人 提交于 2019-12-08 01:48:53
问题 The Material Design Icons project contains large number of icons, but it is not enough for non English country. So how to add another pack icon in personal project without modifying Source Code? 回答1: As @mm8 has said, yes it's just a path; but yes, you can build your own "PackIcon" classes to follow with what you see in MaterialDesignInXaml (and MahApps) pack icons: 1: Create an Enum for each icon in your new set: public enum MyPackIconKind { Happy, Sad } 2: Inherit from PackIconBase. You

Set 24-hour time format for TimePicker

我的未来我决定 提交于 2019-12-06 13:08:33
I'm building an MVVM Light WPF app in Visual Studio 2015 using the Material Design in XAML Toolkit . Here's the TimePicker control: <materialDesign:TimePicker Is24Hours="True" /> Here's what the control looks like when you click it: Note that it shows the time in 24-hour format correctly. However, when you select that time and return to the field, it displays it as non-24-hour time, with AM/PM: Is there any way to force the control to display the time in 24-hour format? Thanks. As of 1.5 you can't explicitly enforce it: You can use SelectedTimeFormat (long/short) e.g. <materialDesign

ContentControl Content Property not changing with hosted content

白昼怎懂夜的黑 提交于 2019-12-06 03:45:58
问题 I am trying to learn MVVM and have come across a weird snag. I have a main menu with a drawer control that comes out and shows a menu: In the main window where this drawer is, I have a ContentControl where I set its content with a Binding. <ContentControl x:Name="MainWindowContentControl" Content="{Binding Path=WindowContent}"/> This window's binding is set to a view model. <Window.DataContext> <viewmodels:MainWindowViewModel/> </Window.DataContext> and here is the ViewModel:

ContentControl Content Property not changing with hosted content

自古美人都是妖i 提交于 2019-12-04 08:18:19
I am trying to learn MVVM and have come across a weird snag. I have a main menu with a drawer control that comes out and shows a menu: In the main window where this drawer is, I have a ContentControl where I set its content with a Binding. <ContentControl x:Name="MainWindowContentControl" Content="{Binding Path=WindowContent}"/> This window's binding is set to a view model. <Window.DataContext> <viewmodels:MainWindowViewModel/> </Window.DataContext> and here is the ViewModel: MainWindowViewModel.cs public class MainWindowViewModel: ViewModelBase { private object _content; public object