From 8c1a23547b5631d832bac8fdb92388f2d0c20796 Mon Sep 17 00:00:00 2001 From: Kevin B Date: Tue, 30 Nov 2021 05:38:40 +0000 Subject: [PATCH 01/51] Bumping versions for next release (#2508) * Bumping versions for next release * Including net6 SDK --- .github/workflows/icon_update.yml | 5 +++-- .github/workflows/nightly_release.yml | 20 ++++++++------------ .github/workflows/pr_verification.yml | 16 ++++++---------- .github/workflows/release.yml | 22 +++++++++------------- 4 files changed, 26 insertions(+), 37 deletions(-) diff --git a/.github/workflows/icon_update.yml b/.github/workflows/icon_update.yml index 3e865bf024..33072c82a0 100644 --- a/.github/workflows/icon_update.yml +++ b/.github/workflows/icon_update.yml @@ -13,13 +13,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x + - name: Run Icon Generation run: dotnet run -c Release -- icons working-directory: ./mdresgen + - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: @@ -35,5 +38,3 @@ jobs: body: > [Icon update detected by Github Action]. Auto generated pull request. - - diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index f32f4a8961..d701daf197 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -9,9 +9,9 @@ env: solution: MaterialDesignToolkit.Full.sln buildPlatform: 'Any CPU' buildConfiguration: 'Release' - mdixColorsVersion: '2.0.4' - mdixMahAppsVersion: '0.2.0' - mdixVersion: '4.3.0' + mdixColorsVersion: '2.0.5' + mdixMahAppsVersion: '0.2.1' + mdixVersion: '4.4.0' jobs: check_for_changes: @@ -42,17 +42,13 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET Core 3.1 + - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: "3.1.x" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} - - - name: Setup .NET 5 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "5.x" + dotnet-version: | + 3.1.x + 5.x + 6.x env: NUGET_AUTH_TOKEN: ${{secrets.PAT}} diff --git a/.github/workflows/pr_verification.yml b/.github/workflows/pr_verification.yml index 1158cc2441..b3b6b3aeba 100644 --- a/.github/workflows/pr_verification.yml +++ b/.github/workflows/pr_verification.yml @@ -19,20 +19,16 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET Core 3.1 + - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: "3.1.x" + dotnet-version: | + 3.1.x + 5.x + 6.x env: NUGET_AUTH_TOKEN: ${{secrets.PAT}} - - - name: Setup .NET 5 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "5.x" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} - + - name: Restore dependencies run: dotnet restore ${{ env.solution }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0b4024fb4..ef2a167ce2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,9 +9,9 @@ env: solution: MaterialDesignToolkit.Full.sln buildPlatform: 'Any CPU' buildConfiguration: 'Release' - mdixColorsVersion: '2.0.4' - mdixMahAppsVersion: '0.2.0' - mdixVersion: '4.3.0' + mdixColorsVersion: '2.0.5' + mdixMahAppsVersion: '0.2.1' + mdixVersion: '4.4.0' jobs: build: @@ -21,20 +21,16 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET Core 3.1 + - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: "3.1.x" + dotnet-version: | + 3.1.x + 5.x + 6.x env: NUGET_AUTH_TOKEN: ${{secrets.PAT}} - - - name: Setup .NET 5 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "5.x" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} - + - name: Restore dependencies run: dotnet restore ${{ env.solution }} From 7dbff295bbfe03b5c9a10e3b4c01a19b91166e3b Mon Sep 17 00:00:00 2001 From: Kevin B Date: Tue, 30 Nov 2021 18:52:12 +0000 Subject: [PATCH 02/51] Implementing canceling of drawer host closing (#2507) The expands the number of ways that the drawer host closing event is raised. It is now raised and cancel-able in all cases. Bumped lang version of the library to 10. Updated to latest XAMLTest --- Directory.Build.props | 2 +- Directory.packages.props | 2 +- .../DrawerHost/CancellingDrawerHost.xaml | 33 +++++ .../DrawerHost/CancellingDrawerHost.xaml.cs | 24 ++++ MaterialDesignThemes.UITests/TestBase.cs | 1 + .../WPF/DrawerHosts/DrawerHostTests.cs | 128 ++++++++++++++++++ .../DrawerClosingEventArgs.cs | 3 +- MaterialDesignThemes.Wpf/DrawerHost.cs | 14 +- 8 files changed, 203 insertions(+), 4 deletions(-) create mode 100644 MaterialDesignThemes.UITests/Samples/DrawerHost/CancellingDrawerHost.xaml create mode 100644 MaterialDesignThemes.UITests/Samples/DrawerHost/CancellingDrawerHost.xaml.cs create mode 100644 MaterialDesignThemes.UITests/WPF/DrawerHosts/DrawerHostTests.cs diff --git a/Directory.Build.props b/Directory.Build.props index 7d786a9e70..b2b76da31e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ Mulholland Software/James Willock Debug;Release - 9.0 + 10.0 prompt true diff --git a/Directory.packages.props b/Directory.packages.props index c6a537b04f..8b7f1cda1e 100644 --- a/Directory.packages.props +++ b/Directory.packages.props @@ -20,7 +20,7 @@ - + diff --git a/MaterialDesignThemes.UITests/Samples/DrawerHost/CancellingDrawerHost.xaml b/MaterialDesignThemes.UITests/Samples/DrawerHost/CancellingDrawerHost.xaml new file mode 100644 index 0000000000..078b6cf079 --- /dev/null +++ b/MaterialDesignThemes.UITests/Samples/DrawerHost/CancellingDrawerHost.xaml @@ -0,0 +1,33 @@ + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - - - - + + + + - - + + - + - - + + - + - - - - - + + + + + - + - - - - - + + + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - - - - - - + + + + + + + - - + + - - + + - - + + - + - - - - + + + + - + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - + - - + + - - + + - - + + - - + + - - - - + + + + - + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + From c3a41ffe7bcc4d7d3fb02d4a73d6f47890e135cf Mon Sep 17 00:00:00 2001 From: Michel Michels Date: Thu, 16 Dec 2021 06:03:46 +0100 Subject: [PATCH 19/51] Material Design 3: Various tasks completed (#2526) * Copy of MaterialDesignTheme.Defaults.xaml made * MaterialDesignTheme.Defaults replaced by MaterialDesign2.Defaults * Noto Sans font added * Added Typography MaterialDesign3 * Add MaterialDesign3Demo with own namespace * TextBlock styles suffixed with 'TextBlock' * Changing Material Design 3 Typography page [wip] * Revert MaterialDesign2 -> MaterialDesignTheme * Add Typography Material Design 3 Demo * Set font to Noto for Material Design 3 --- MaterialDesign3.Demo.Wpf/App.config | 9 + MaterialDesign3.Demo.Wpf/App.manifest | 80 ++ MaterialDesign3.Demo.Wpf/App.xaml | 177 +++ MaterialDesign3.Demo.Wpf/App.xaml.cs | 39 + MaterialDesign3.Demo.Wpf/ButtonAssist.cs | 19 + MaterialDesign3.Demo.Wpf/Buttons.xaml | 1015 +++++++++++++++++ MaterialDesign3.Demo.Wpf/Buttons.xaml.cs | 35 + MaterialDesign3.Demo.Wpf/Cards.xaml | 556 +++++++++ MaterialDesign3.Demo.Wpf/Cards.xaml.cs | 12 + MaterialDesign3.Demo.Wpf/Chips.xaml | 429 +++++++ MaterialDesign3.Demo.Wpf/Chips.xaml.cs | 16 + MaterialDesign3.Demo.Wpf/ColorScheme.cs | 10 + MaterialDesign3.Demo.Wpf/ColorTool.xaml | 611 ++++++++++ MaterialDesign3.Demo.Wpf/ColorTool.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/ColorZones.xaml | 244 ++++ MaterialDesign3.Demo.Wpf/ColorZones.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/ComboBoxes.xaml | 380 ++++++ MaterialDesign3.Demo.Wpf/ComboBoxes.xaml.cs | 19 + .../Converters/BrushToHexConverter.cs | 24 + .../Converters/ColorToBrushConverter.cs | 29 + .../Converters/MultiValueEqualityConverter.cs | 20 + .../Converters/StringJoinConverter.cs | 24 + MaterialDesign3.Demo.Wpf/DataGrids.xaml | 166 +++ MaterialDesign3.Demo.Wpf/DataGrids.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/Dialogs.xaml | 365 ++++++ MaterialDesign3.Demo.Wpf/Dialogs.xaml.cs | 47 + .../Domain/AnotherCommandImplementation.cs | 44 + .../Domain/BindingProxy.cs | 18 + .../Domain/ButtonsViewModel.cs | 186 +++ .../Domain/ColorToolViewModel.cs | 203 ++++ .../Domain/ComboBoxesViewModel.cs | 54 + MaterialDesign3.Demo.Wpf/Domain/DemoItem.cs | 61 + .../Domain/DialogsViewModel.cs | 122 ++ .../Domain/DocumentationLink.cs | 93 ++ .../Domain/DocumentationLinkType.cs | 11 + .../Domain/DocumentationLinks.xaml | 133 +++ .../Domain/DocumentationLinks.xaml.cs | 15 + .../Domain/FieldsViewModel.cs | 40 + .../Domain/FutureDateValidationRule.cs | 22 + .../Domain/IconPackViewModel.cs | 188 +++ .../Domain/IsCheckedValidationRule.cs | 17 + MaterialDesign3.Demo.Wpf/Domain/Link.cs | 18 + .../Domain/ListsAndGridsViewModel.cs | 82 ++ .../Domain/MainWindowViewModel.cs | 426 +++++++ .../Domain/NotEmptyValidationRule.cs | 15 + .../Domain/PaletteSelectorViewModel.cs | 43 + .../Domain/PickersViewModel.cs | 42 + .../Domain/Sample4Dialog.xaml | 42 + .../Domain/Sample4Dialog.xaml.cs | 15 + .../Domain/SampleDialog.xaml | 72 ++ .../Domain/SampleDialog.xaml.cs | 15 + .../Domain/SampleDialogViewModel.cs | 13 + .../Domain/SampleMessageDialog.xaml | 33 + .../Domain/SampleMessageDialog.xaml.cs | 15 + .../Domain/SampleProgressDialog.xaml | 15 + .../Domain/SampleProgressDialog.xaml.cs | 15 + .../Domain/SelectableViewModel.cs | 48 + .../Domain/SimpleDataTemplateSelector.cs | 15 + .../Domain/SimpleDateValidationRule.cs | 19 + .../Domain/SlidersViewModel.cs | 40 + .../Domain/ThemeSettingsViewModel.cs | 140 +++ .../Domain/TreesViewModel.cs | 138 +++ .../Domain/ViewModelBase.cs | 39 + MaterialDesign3.Demo.Wpf/Drawers.xaml | 225 ++++ MaterialDesign3.Demo.Wpf/Drawers.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/Expander.xaml | 257 +++++ MaterialDesign3.Demo.Wpf/Expander.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/Fields.xaml | 600 ++++++++++ MaterialDesign3.Demo.Wpf/Fields.xaml.cs | 17 + MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml | 399 +++++++ MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs | 104 ++ MaterialDesign3.Demo.Wpf/GroupBoxes.xaml | 208 ++++ MaterialDesign3.Demo.Wpf/GroupBoxes.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/Home.xaml | 314 +++++ MaterialDesign3.Demo.Wpf/Home.xaml.cs | 26 + MaterialDesign3.Demo.Wpf/IconPack.xaml | 233 ++++ MaterialDesign3.Demo.Wpf/IconPack.xaml.cs | 28 + MaterialDesign3.Demo.Wpf/Lists.xaml | 222 ++++ MaterialDesign3.Demo.Wpf/Lists.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/MainWindow.xaml | 241 ++++ MaterialDesign3.Demo.Wpf/MainWindow.xaml.cs | 101 ++ .../MaterialDesign3Demo.csproj | 63 + .../MenusAndToolBars.xaml | 245 ++++ .../MenusAndToolBars.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/NavigationRail.xaml | 607 ++++++++++ .../NavigationRail.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/PackIconKindGroup.cs | 23 + MaterialDesign3.Demo.Wpf/Palette.xaml | 78 ++ MaterialDesign3.Demo.Wpf/Palette.xaml.cs | 7 + .../PaletteHelperExtensions.cs | 32 + MaterialDesign3.Demo.Wpf/PaletteSelector.xaml | 146 +++ .../PaletteSelector.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/Pickers.xaml | 667 +++++++++++ MaterialDesign3.Demo.Wpf/Pickers.xaml.cs | 102 ++ MaterialDesign3.Demo.Wpf/Progress.xaml | 377 ++++++ MaterialDesign3.Demo.Wpf/Progress.xaml.cs | 7 + .../Properties/AssemblyInfo.cs | 27 + .../Properties/Resources.Designer.cs | 63 + .../Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 26 + .../Properties/Settings.settings | 7 + MaterialDesign3.Demo.Wpf/RatingBar.xaml | 84 ++ MaterialDesign3.Demo.Wpf/RatingBar.xaml.cs | 13 + .../Resources/Chartridge046_small.jpg | Bin 0 -> 59387 bytes .../Resources/Contact.png | Bin 0 -> 163487 bytes .../Resources/ProfilePic.jpg | Bin 0 -> 43733 bytes .../Resources/favicon.ico | Bin 0 -> 1150 bytes .../Resources/ms-icon-310x310.png | Bin 0 -> 58504 bytes .../ScreenGrabFromGoogle.gif | Bin 0 -> 14814 bytes MaterialDesign3.Demo.Wpf/Shadows.xaml | 187 +++ MaterialDesign3.Demo.Wpf/Shadows.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/Sliders.xaml | 292 +++++ MaterialDesign3.Demo.Wpf/Sliders.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/Snackbars.xaml | 420 +++++++ MaterialDesign3.Demo.Wpf/Snackbars.xaml.cs | 56 + MaterialDesign3.Demo.Wpf/ThemeSettings.xaml | 101 ++ .../ThemeSettings.xaml.cs | 13 + MaterialDesign3.Demo.Wpf/Toggles.xaml | 884 ++++++++++++++ MaterialDesign3.Demo.Wpf/Toggles.xaml.cs | 8 + MaterialDesign3.Demo.Wpf/Transitions.xaml | 12 + MaterialDesign3.Demo.Wpf/Transitions.xaml.cs | 7 + .../TransitionsDemo/Slide1_Intro.xaml | 52 + .../TransitionsDemo/Slide1_Intro.xaml.cs | 27 + .../TransitionsDemo/Slide2_Intro.xaml | 50 + .../TransitionsDemo/Slide2_Intro.xaml.cs | 15 + .../TransitionsDemo/Slide3_Intro.xaml | 45 + .../TransitionsDemo/Slide3_Intro.xaml.cs | 15 + .../Slide4_CombineTransitions.xaml | 55 + .../Slide4_CombineTransitions.xaml.cs | 15 + .../Slide5_TransitioningContent.xaml | 202 ++++ .../Slide5_TransitioningContent.xaml.cs | 15 + .../TransitionsDemo/Slide6_Origins.xaml | 72 ++ .../TransitionsDemo/Slide6_Origins.xaml.cs | 26 + .../TransitionsDemo/Slide7_MVVM.xaml | 54 + .../TransitionsDemo/Slide7_MVVM.xaml.cs | 15 + .../TransitionsDemo/Slide7_MasterModel.cs | 11 + .../TransitionsDemo/Slide8_Details.xaml | 14 + .../TransitionsDemo/Slide8_Details.xaml.cs | 15 + .../TransitionsDemo/TransitionsDemoHome.xaml | 98 ++ .../TransitionsDemoHome.xaml.cs | 15 + MaterialDesign3.Demo.Wpf/Trees.xaml | 481 ++++++++ MaterialDesign3.Demo.Wpf/Trees.xaml.cs | 24 + MaterialDesign3.Demo.Wpf/Typography.xaml | 950 +++++++++++++++ MaterialDesign3.Demo.Wpf/Typography.xaml.cs | 7 + MaterialDesign3.Demo.Wpf/XamlDisplayEx.cs | 21 + MaterialDesign3.Demo.Wpf/favicon.ico | Bin 0 -> 1150 bytes .../MaterialDesignThemes.Wpf.csproj | 42 + MaterialDesignThemes.Wpf/NotoFontExtension.cs | 19 + .../Resources/Noto/NotoSans-Bold.ttf | Bin 0 -> 398652 bytes .../Resources/Noto/NotoSans-BoldItalic.ttf | Bin 0 -> 285736 bytes .../Resources/Noto/NotoSans-Italic.ttf | Bin 0 -> 274624 bytes .../Resources/Noto/NotoSans-Regular.ttf | Bin 0 -> 398968 bytes .../Resources/Noto/OFL.txt | 93 ++ .../RobotoFontExtension.cs | 19 + .../Themes/MaterialDesign2.Defaults.xaml | 101 ++ .../Themes/MaterialDesign3.Defaults.xaml | 103 ++ .../Themes/MaterialDesign3.Font.xaml | 6 + .../Themes/MaterialDesign3.TextBlock.xaml | 213 ++++ .../Themes/MaterialDesign3.Window.xaml | 30 + MaterialDesignToolkit.Full.sln | 19 + 160 files changed, 17538 insertions(+) create mode 100644 MaterialDesign3.Demo.Wpf/App.config create mode 100644 MaterialDesign3.Demo.Wpf/App.manifest create mode 100644 MaterialDesign3.Demo.Wpf/App.xaml create mode 100644 MaterialDesign3.Demo.Wpf/App.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/ButtonAssist.cs create mode 100644 MaterialDesign3.Demo.Wpf/Buttons.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Buttons.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Cards.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Cards.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Chips.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Chips.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/ColorScheme.cs create mode 100644 MaterialDesign3.Demo.Wpf/ColorTool.xaml create mode 100644 MaterialDesign3.Demo.Wpf/ColorTool.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/ColorZones.xaml create mode 100644 MaterialDesign3.Demo.Wpf/ColorZones.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/ComboBoxes.xaml create mode 100644 MaterialDesign3.Demo.Wpf/ComboBoxes.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Converters/BrushToHexConverter.cs create mode 100644 MaterialDesign3.Demo.Wpf/Converters/ColorToBrushConverter.cs create mode 100644 MaterialDesign3.Demo.Wpf/Converters/MultiValueEqualityConverter.cs create mode 100644 MaterialDesign3.Demo.Wpf/Converters/StringJoinConverter.cs create mode 100644 MaterialDesign3.Demo.Wpf/DataGrids.xaml create mode 100644 MaterialDesign3.Demo.Wpf/DataGrids.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Dialogs.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Dialogs.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/AnotherCommandImplementation.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ButtonsViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ColorToolViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ComboBoxesViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DemoItem.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DialogsViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DocumentationLink.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DocumentationLinkType.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DocumentationLinks.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Domain/DocumentationLinks.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/FieldsViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/FutureDateValidationRule.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/IconPackViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/IsCheckedValidationRule.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/Link.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ListsAndGridsViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/MainWindowViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/NotEmptyValidationRule.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/PaletteSelectorViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/PickersViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/Sample4Dialog.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Domain/Sample4Dialog.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleDialog.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleDialog.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleDialogViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleMessageDialog.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleMessageDialog.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleProgressDialog.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SampleProgressDialog.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SelectableViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SimpleDataTemplateSelector.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SimpleDateValidationRule.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/SlidersViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ThemeSettingsViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/TreesViewModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/Domain/ViewModelBase.cs create mode 100644 MaterialDesign3.Demo.Wpf/Drawers.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Drawers.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Expander.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Expander.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Fields.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Fields.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml create mode 100644 MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/GroupBoxes.xaml create mode 100644 MaterialDesign3.Demo.Wpf/GroupBoxes.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Home.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Home.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/IconPack.xaml create mode 100644 MaterialDesign3.Demo.Wpf/IconPack.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Lists.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Lists.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/MainWindow.xaml create mode 100644 MaterialDesign3.Demo.Wpf/MainWindow.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/MaterialDesign3Demo.csproj create mode 100644 MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml create mode 100644 MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/NavigationRail.xaml create mode 100644 MaterialDesign3.Demo.Wpf/NavigationRail.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/PackIconKindGroup.cs create mode 100644 MaterialDesign3.Demo.Wpf/Palette.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Palette.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/PaletteHelperExtensions.cs create mode 100644 MaterialDesign3.Demo.Wpf/PaletteSelector.xaml create mode 100644 MaterialDesign3.Demo.Wpf/PaletteSelector.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Pickers.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Pickers.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Progress.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Progress.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Properties/AssemblyInfo.cs create mode 100644 MaterialDesign3.Demo.Wpf/Properties/Resources.Designer.cs create mode 100644 MaterialDesign3.Demo.Wpf/Properties/Resources.resx create mode 100644 MaterialDesign3.Demo.Wpf/Properties/Settings.Designer.cs create mode 100644 MaterialDesign3.Demo.Wpf/Properties/Settings.settings create mode 100644 MaterialDesign3.Demo.Wpf/RatingBar.xaml create mode 100644 MaterialDesign3.Demo.Wpf/RatingBar.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Resources/Chartridge046_small.jpg create mode 100644 MaterialDesign3.Demo.Wpf/Resources/Contact.png create mode 100644 MaterialDesign3.Demo.Wpf/Resources/ProfilePic.jpg create mode 100644 MaterialDesign3.Demo.Wpf/Resources/favicon.ico create mode 100644 MaterialDesign3.Demo.Wpf/Resources/ms-icon-310x310.png create mode 100644 MaterialDesign3.Demo.Wpf/ScreenGrabFromGoogle.gif create mode 100644 MaterialDesign3.Demo.Wpf/Shadows.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Shadows.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Sliders.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Sliders.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Snackbars.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Snackbars.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/ThemeSettings.xaml create mode 100644 MaterialDesign3.Demo.Wpf/ThemeSettings.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Toggles.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Toggles.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Transitions.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Transitions.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide1_Intro.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide1_Intro.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide2_Intro.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide2_Intro.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide3_Intro.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide3_Intro.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide4_CombineTransitions.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide4_CombineTransitions.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide5_TransitioningContent.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide5_TransitioningContent.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide6_Origins.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide6_Origins.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide7_MVVM.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide7_MVVM.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide7_MasterModel.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide8_Details.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/Slide8_Details.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/TransitionsDemoHome.xaml create mode 100644 MaterialDesign3.Demo.Wpf/TransitionsDemo/TransitionsDemoHome.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Trees.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Trees.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/Typography.xaml create mode 100644 MaterialDesign3.Demo.Wpf/Typography.xaml.cs create mode 100644 MaterialDesign3.Demo.Wpf/XamlDisplayEx.cs create mode 100644 MaterialDesign3.Demo.Wpf/favicon.ico create mode 100644 MaterialDesignThemes.Wpf/NotoFontExtension.cs create mode 100644 MaterialDesignThemes.Wpf/Resources/Noto/NotoSans-Bold.ttf create mode 100644 MaterialDesignThemes.Wpf/Resources/Noto/NotoSans-BoldItalic.ttf create mode 100644 MaterialDesignThemes.Wpf/Resources/Noto/NotoSans-Italic.ttf create mode 100644 MaterialDesignThemes.Wpf/Resources/Noto/NotoSans-Regular.ttf create mode 100644 MaterialDesignThemes.Wpf/Resources/Noto/OFL.txt create mode 100644 MaterialDesignThemes.Wpf/RobotoFontExtension.cs create mode 100644 MaterialDesignThemes.Wpf/Themes/MaterialDesign2.Defaults.xaml create mode 100644 MaterialDesignThemes.Wpf/Themes/MaterialDesign3.Defaults.xaml create mode 100644 MaterialDesignThemes.Wpf/Themes/MaterialDesign3.Font.xaml create mode 100644 MaterialDesignThemes.Wpf/Themes/MaterialDesign3.TextBlock.xaml create mode 100644 MaterialDesignThemes.Wpf/Themes/MaterialDesign3.Window.xaml diff --git a/MaterialDesign3.Demo.Wpf/App.config b/MaterialDesign3.Demo.Wpf/App.config new file mode 100644 index 0000000000..cd2f0eda87 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/App.config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/App.manifest b/MaterialDesign3.Demo.Wpf/App.manifest new file mode 100644 index 0000000000..51c4989748 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/App.manifest @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PerMonitorV2, PerMonitor, System + true + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/App.xaml b/MaterialDesign3.Demo.Wpf/App.xaml new file mode 100644 index 0000000000..7830804e34 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/App.xaml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/App.xaml.cs b/MaterialDesign3.Demo.Wpf/App.xaml.cs new file mode 100644 index 0000000000..2025e3fc4c --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/App.xaml.cs @@ -0,0 +1,39 @@ +using System.Windows; +using ShowMeTheXAML; + +namespace MaterialDesign3Demo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + //This is an alternate way to initialize MaterialDesignInXAML if you don't use the MaterialDesignResourceDictionary in App.xaml + //Color primaryColor = SwatchHelper.Lookup[MaterialDesignColor.DeepPurple]; + //Color accentColor = SwatchHelper.Lookup[MaterialDesignColor.Lime]; + //ITheme theme = Theme.Create(new MaterialDesignLightTheme(), primaryColor, accentColor); + //Resources.SetTheme(theme); + + + //Illustration of setting culture info fully in WPF: + /* + Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR"); + Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR"); + FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata( + XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); + */ + + XamlDisplay.Init(); + + // test setup for Persian culture settings + /*System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fa-Ir"); + System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fa-Ir"); + FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata( + System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));*/ + + base.OnStartup(e); + } + } +} diff --git a/MaterialDesign3.Demo.Wpf/ButtonAssist.cs b/MaterialDesign3.Demo.Wpf/ButtonAssist.cs new file mode 100644 index 0000000000..e3b2b525df --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ButtonAssist.cs @@ -0,0 +1,19 @@ +using System.Windows; + +namespace MaterialDesign3Demo +{ + public static class ButtonAssist + { + public static readonly DependencyProperty UniformCornerRadiusProperty = DependencyProperty.RegisterAttached( + "UniformCornerRadius", typeof(double), typeof(ButtonAssist), new PropertyMetadata(2.0, OnUniformCornerRadius)); + + private static void OnUniformCornerRadius(DependencyObject d, DependencyPropertyChangedEventArgs e) + => MaterialDesignThemes.Wpf.ButtonAssist.SetCornerRadius(d, new CornerRadius((double)e.NewValue)); + + public static void SetUniformCornerRadius(DependencyObject element, double value) + => element.SetValue(UniformCornerRadiusProperty, value); + + public static double GetUniformCornerRadius(DependencyObject element) + => (double)element.GetValue(UniformCornerRadiusProperty); + } +} \ No newline at end of file diff --git a/MaterialDesign3.Demo.Wpf/Buttons.xaml b/MaterialDesign3.Demo.Wpf/Buttons.xaml new file mode 100644 index 0000000000..c0cb662748 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/Buttons.xaml @@ -0,0 +1,1015 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 24 + 90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 124 + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cycling + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/Cards.xaml.cs b/MaterialDesign3.Demo.Wpf/Cards.xaml.cs new file mode 100644 index 0000000000..fe8eb93788 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/Cards.xaml.cs @@ -0,0 +1,12 @@ +using System.Windows; + +namespace MaterialDesign3Demo +{ + public partial class Cards + { + public Cards() => InitializeComponent(); + + private void Flipper_OnIsFlippedChanged(object sender, RoutedPropertyChangedEventArgs e) + => System.Diagnostics.Debug.WriteLine($"Card is flipped = {e.NewValue}"); + } +} diff --git a/MaterialDesign3.Demo.Wpf/Chips.xaml b/MaterialDesign3.Demo.Wpf/Chips.xaml new file mode 100644 index 0000000000..53bc3bd1e4 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/Chips.xaml @@ -0,0 +1,429 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Secondary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/Chips.xaml.cs b/MaterialDesign3.Demo.Wpf/Chips.xaml.cs new file mode 100644 index 0000000000..be16bce91c --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/Chips.xaml.cs @@ -0,0 +1,16 @@ +using System.Windows; + +namespace MaterialDesign3Demo +{ + public partial class Chips + { + public Chips() => InitializeComponent(); + + private void ButtonsDemoChip_OnClick(object sender, RoutedEventArgs e) + => MainWindow.Snackbar.MessageQueue?.Enqueue("Chip clicked!"); + + private void ButtonsDemoChip_OnDeleteClick(object sender, RoutedEventArgs e) + => MainWindow.Snackbar.MessageQueue?.Enqueue("Chip delete clicked!"); + + } +} diff --git a/MaterialDesign3.Demo.Wpf/ColorScheme.cs b/MaterialDesign3.Demo.Wpf/ColorScheme.cs new file mode 100644 index 0000000000..aa9ba208c8 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ColorScheme.cs @@ -0,0 +1,10 @@ +namespace MaterialDesign3Demo +{ + enum ColorScheme + { + Primary, + Secondary, + PrimaryForeground, + SecondaryForeground + } +} diff --git a/MaterialDesign3.Demo.Wpf/ColorTool.xaml b/MaterialDesign3.Demo.Wpf/ColorTool.xaml new file mode 100644 index 0000000000..b81abf4be1 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ColorTool.xaml @@ -0,0 +1,611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MaterialDesign3.Demo.Wpf/ColorTool.xaml.cs b/MaterialDesign3.Demo.Wpf/ColorTool.xaml.cs new file mode 100644 index 0000000000..ee42439a45 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ColorTool.xaml.cs @@ -0,0 +1,13 @@ +using MaterialDesign3Demo.Domain; + +namespace MaterialDesign3Demo +{ + public partial class ColorTool + { + public ColorTool() + { + DataContext = new ColorToolViewModel(); + InitializeComponent(); + } + } +} diff --git a/MaterialDesign3.Demo.Wpf/ColorZones.xaml b/MaterialDesign3.Demo.Wpf/ColorZones.xaml new file mode 100644 index 0000000000..62efbcc8e6 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ColorZones.xaml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +