h5网站开发实例教程,如何做网站运营呢,平凉市市建设局网站,wordpress 最大上传文件前言
Material Design in xaml 是开源免费的ui框架#xff0c;工控软件主打的就是简单界面。 以下简称MD
相关资源 MaterialDesignInXamlToolkit Github 地址 MD 快速启动 MD 案例压缩包 MD 框架使用
启动环境配置
安装Nuget包 App.xaml 配置
Application x:Class工控软件主打的就是简单界面。 以下简称MD
相关资源 MaterialDesignInXamlToolkit Github 地址 MD 快速启动 MD 案例压缩包 MD 框架使用
启动环境配置
安装Nuget包 App.xaml 配置
Application x:ClassWpfApp1.Appxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:materialDesignhttp://materialdesigninxaml.net/winfx/xaml/themesStartupUriMainWindow.xamlApplication.ResourcesResourceDictionary!--添加MD 资源包--ResourceDictionary.MergedDictionariesmaterialDesign:BundledTheme BaseThemeLightPrimaryColorDeepPurple SecondaryColorLime /ResourceDictionarySourcepack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml //ResourceDictionary.MergedDictionaries/ResourceDictionary/Application.Resources
/Application测试导入是否成功
MainWindow.xmal
Window x:ClassWpfApp1.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:WpfApp1xmlns:MDhttp://materialdesigninxaml.net/winfx/xaml/themesxmlns:Viewsclr-namespace:WpfApp1.Views mc:IgnorabledTitleMainWindow Height450 Width800Window.ResourcesStyle x:Keymy_text TargetTypeTextBlockSetter PropertyFontSize Value30 /Setter PropertyMargin Value8 //Style/Window.ResourcesWindow.DataContext!--需要命名来指定数据源--local:MainWindowViewModel x:NameviewModel //Window.DataContextGrid!--不能直接写TitleValueBinding数据源会有问题--MD:CardTabControl MD:ColorZoneAssist.ModePrimaryLightTabItem HeaderTab 1/TabItemTabItem HeaderTab 2/TabItemTabItem HeaderTab 3/TabItem/TabControl/MD:Card/Grid
/Window MD 组件使用测试
Button
Card
WrapPanel Margin10Button Width90 ContentButton Margin5/Button Margin5 MD:PackIcon KindAlarm Width30 Height25//Button
/WrapPanel我后面想稍微改一下按钮比如改个圆角发现很麻烦可能需要覆写控件模板。想想还是算了先用官方的解决方案。先学套路解决问题再了解底层扩展方法。
PopupBox
Chips
Color Tool
Colour Zones
ComboBoxes
Data Grids
Dialogs
Drawer
Elevation
Expander
Fields
Fields line up
Group Boxes
Icon Pack
Lists
Menus Tool Bars
Navigation Rail
Palette
Pickers
Progress Indicators
Rating Bar
Sliders
Smart Hint
Snackbar
Tabs
Toggles
Transitions
Trees
Typography