{"id":806,"date":"2020-08-10T22:47:55","date_gmt":"2020-08-10T13:47:55","guid":{"rendered":"https:\/\/todosoft.net\/blog\/?p=806"},"modified":"2020-08-10T22:47:56","modified_gmt":"2020-08-10T13:47:56","slug":"post-806","status":"publish","type":"post","link":"https:\/\/todosoft.net\/blog\/?p=806","title":{"rendered":"\u3088\u304f\u4f7f\u3046\u521d\u671f\u74b0\u5883\u3000MaterialDesignThemes 3.1.3 \u5bfe\u5fdc\u7248"},"content":{"rendered":"\n<p><a href=\"https:\/\/todosoft.net\/blog\/?p=520\" target=\"_blank\" rel=\"noreferrer noopener\">\u3088\u304f\u4f7f\u3046\u521d\u671f\u74b0\u5883<\/a> \u306eMaterialDesignThemes 3.1.3 \u5bfe\u5fdc\u7248<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ControlzEx 4.3.2<\/li><li><a href=\"https:\/\/github.com\/runceel\/Livet\" target=\"_blank\" rel=\"noreferrer noopener\">LivetCask<\/a> 3.2.3.1<\/li><li>LivetCask.Behaviors 3.2.3.1<\/li><li>LivetCask.Collections 3.2.3.1<\/li><li>LivetCask.Converters 3.2.3.1<\/li><li>LivetCask.Core 3.2.3.1<\/li><li>LivetCask.EventListeners 3.2.3.1<\/li><li>LivetCask.Messaging 3.2.3.1<\/li><li>LivetCask.Mvvm 3.2.3.1<\/li><li><a href=\"https:\/\/github.com\/MahApps\/MahApps.Metro\" target=\"_blank\" rel=\"noreferrer noopener\">MahApps.Metro<\/a> 2.2.0<\/li><li>MaterialDesignColors 1.2.6<\/li><li><a href=\"https:\/\/github.com\/MaterialDesignInXAML\/MaterialDesignInXamlToolkit\" target=\"_blank\" rel=\"noreferrer noopener\">MaterialDesignThemes<\/a> 3.1.3<\/li><li>MaterialDesignThemes.MahApps 0.1.4<\/li><li>Microsoft.Xaml.Behaviors.Wpf 1.1.19<\/li><\/ul>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">App.xaml<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">&lt;Application x:Class=\"WpfApp1.App\"\n             xmlns=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation\"\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\"\n             xmlns:local=\"clr-namespace:WpfApp1\"\n             xmlns:materialDesign=\"http:\/\/materialdesigninxaml.net\/winfx\/xaml\/themes\"\n             StartupUri=\"View\\MainView.xaml\">\n    &lt;Application.Resources>\n\n        &lt;ResourceDictionary>\n            &lt;ResourceDictionary.MergedDictionaries>\n\n                &lt;!--MahApps-->\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Controls.xaml\" \/>\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Fonts.xaml\" \/>\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Themes\/Light.Steel.xaml\" \/>\n\n                &lt;!--Material Design-->\n                &lt;materialDesign:BundledTheme BaseTheme=\"Light\" PrimaryColor=\"Indigo\" SecondaryColor=\"Indigo\" \/>\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MaterialDesignThemes.Wpf;component\/Themes\/MaterialDesignTheme.Defaults.xaml\" \/>\n\n                &lt;!--Material Design: MahApps\u7d71\u5408\u8a2d\u5b9a -->\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MaterialDesignThemes.MahApps;component\/Themes\/MaterialDesignTheme.MahApps.Fonts.xaml\" \/>\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MaterialDesignThemes.MahApps;component\/Themes\/MaterialDesignTheme.MahApps.Flyout.xaml\" \/>\n\n            &lt;\/ResourceDictionary.MergedDictionaries>\n\n        &lt;\/ResourceDictionary>\n\n    &lt;\/Application.Resources>\n&lt;\/Application>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">View\\MainView.xaml<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">&lt;metro:MetroWindow\n        x:Class=\"WpfApp1.View.MainView\"\n        xmlns=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation\"\n        xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\"\n        xmlns:d=\"http:\/\/schemas.microsoft.com\/expression\/blend\/2008\"\n        xmlns:mc=\"http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006\"\n        xmlns:i=\"http:\/\/schemas.microsoft.com\/xaml\/behaviors\"\n        xmlns:l=\"http:\/\/schemas.livet-mvvm.net\/2011\/wpf\"\n        xmlns:local=\"clr-namespace:WpfApp1\"\n        xmlns:vm=\"clr-namespace:WpfApp1.ViewModel\"\n        xmlns:materialDesign=\"http:\/\/materialdesigninxaml.net\/winfx\/xaml\/themes\"\n        xmlns:metro=\"http:\/\/metro.mahapps.com\/winfx\/xaml\/controls\"\n        xmlns:Dialog=\"clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro\"\n        mc:Ignorable=\"d\"\n        TextElement.Foreground=\"{DynamicResource MaterialDesignBody}\"\n        TextElement.FontWeight=\"Regular\"\n        TextElement.FontSize=\"13\"\n        TextOptions.TextFormattingMode=\"Ideal\" \n        TextOptions.TextRenderingMode=\"Auto\"        \n        Background=\"{DynamicResource MaterialDesignPaper}\"\n        FontFamily=\"{DynamicResource MaterialDesignFont}\"\n        ResizeMode=\"CanResizeWithGrip\"\n        WindowStartupLocation=\"CenterScreen\"\n        BorderThickness=\"1\"\n        GlowBrush=\"{DynamicResource MahApps.Brushes.Accent}\"\n        WindowTransitionsEnabled=\"False\"\n        TitleCharacterCasing=\"Normal\"\n        ShowIconOnTitleBar=\"True\"\n        Title=\"MainView\" Height=\"450\" Width=\"800\">\n\n    &lt;Window.DataContext>\n        &lt;vm:MainViewModel>\n            &lt;vm:MainViewModel.MahAppsDialogCoordinator>\n                &lt;Dialog:DialogCoordinator\/>\n            &lt;\/vm:MainViewModel.MahAppsDialogCoordinator>\n        &lt;\/vm:MainViewModel>\n    &lt;\/Window.DataContext>\n\n    &lt;i:Interaction.Triggers>\n        &lt;i:EventTrigger EventName =\"ContentRendered\">\n            &lt;l:LivetCallMethodAction MethodTarget=\"{Binding}\" MethodName=\"OnContentRendered\" \/>\n        &lt;\/i:EventTrigger>\n        &lt;l:InteractionMessageTrigger Messenger=\"{Binding Messenger}\" MessageKey=\"Information\">\n            &lt;l:InformationDialogInteractionMessageAction InvokeActionOnlyWhenWindowIsActive=\"False\" \/>\n        &lt;\/l:InteractionMessageTrigger>\n    &lt;\/i:Interaction.Triggers>\n\n    &lt;Grid>\n        &lt;Button Content=\"Test\">\n            &lt;i:Interaction.Triggers>\n                &lt;i:EventTrigger EventName=\"Click\">\n                    &lt;l:LivetCallMethodAction MethodTarget=\"{Binding}\" MethodName=\"OnButtonClicked\" \/>\n                &lt;\/i:EventTrigger>\n            &lt;\/i:Interaction.Triggers>\n        &lt;\/Button>\n    &lt;\/Grid>\n&lt;\/metro:MetroWindow>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">View\\MainView.xaml.cs<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">using MahApps.Metro.Controls;\nusing MahApps.Metro.Controls.Dialogs;\n\nnamespace WpfApp1.View\n{\n    \/\/\/ &lt;summary>\n    \/\/\/ MainView.xaml \u306e\u76f8\u4e92\u4f5c\u7528\u30ed\u30b8\u30c3\u30af\n    \/\/\/ &lt;\/summary>\n    public partial class MainView : MetroWindow\n    {\n        public MainView()\n        {\n            InitializeComponent();\n\n            this.Loaded += (sender, args) =>\n            {\n                DialogParticipation.SetRegister(this, this.DataContext);\n            };\n\n            this.Unloaded += (sender, args) =>\n            {\n                DialogParticipation.SetRegister(this, null);\n            };\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">ViewModel\\MainViewModel.cs<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">using MahApps.Metro.Controls.Dialogs;\n\nnamespace WpfApp1.ViewModel\n{\n    public class MainViewModel : Livet.ViewModel\n    {\n        public IDialogCoordinator MahAppsDialogCoordinator { get; set; }\n\n        public void OnContentRendered()\n        {\n\n        }\n\n        public async void OnButtonClicked()\n        {\n            await MahAppsDialogCoordinator.ShowMessageAsync(this, \"ShowMessageBox\", \"ShowMessageBoxText\");\n        }\n    }\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3088\u304f\u4f7f\u3046\u521d\u671f\u74b0\u5883 \u306eMaterialDesignThemes 3.1.3 \u5bfe\u5fdc\u7248 ControlzEx 4.3.2 LivetCask 3.2.3.1 LivetCask.Behaviors 3.2.3.1 LivetC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,20,55,8],"tags":[35,24,29,27,23],"class_list":["post-806","post","type-post","status-publish","format-standard","hentry","category-c","category-wpf","category-55","category-8","tag-c","tag-livet","tag-mahapps","tag-material-design-in-xaml-toolkit","tag-wpf"],"_links":{"self":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=806"}],"version-history":[{"count":2,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions"}],"predecessor-version":[{"id":808,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions\/808"}],"wp:attachment":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}