--- lang: ja-jp breaks: true --- # WPF .NET Core に MaterialDesignInXamlToolkit を適用する。 2021-05-19 > aterialDesignInXAML/MaterialDesignInXamlToolkit > https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit > Material Design Icons > https://materialdesignicons.com/ > Keboo/MaterialDesignInXaml.Examples > https://github.com/Keboo/MaterialDesignInXaml.Examples > 5 Steps to Getting Started with Material Design In XAML > https://intellitect.com/getting-started-material-design-in-xaml/ > Super Quick Start > https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/wiki/Super-Quick-Start > Getting Started > https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/wiki/Getting-Started > ## NuGet より、MaterialDesignThemes を追加  ## NuGet より、ShowMeTheXAML.MSBuild を追加  ## App.xaml ```xml= <Application ・・・ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" > <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> ``` ## MainWindow.xaml ```xml= <Window ・・・ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:system="clr-namespace:System;assembly=mscorlib" TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Medium" TextElement.FontSize="14" TextOptions.TextFormattingMode="Ideal" TextOptions.TextRenderingMode="Auto" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}" xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" ・・・ > <Grid> <StackPanel Orientation="Vertical"> <Button Style="{StaticResource MaterialDesignRaisedButton}" Width="100" ToolTip="Resource name: MaterialDesignRaisedButton" Content="_MID" /> </StackPanel> </Grid> </Window> ``` ## 確認  ###### tags: `WPF` `.NET Core` `MaterialDesignThemes` `XAML`
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.