diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 367304f0db..44f785bf06 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -20,10 +20,6 @@ The API is king. If adding anything to the public interface of this library (con This whole project is a personal hobby, and this is even more true of the UWP section. I'm not accepting any PRs to UWP as I will be coding on this in my spare time, and using it as a way to learn and explore UWP for my own enlightenment. If and when the UWP solution becomes more mature I will relax this stance. -## TabControl: - -There is no TabControl style, I won't create one, and I won't accept one. I have Dragablz and don't want the added burden of supporting two styles; even if it is fully complete. I don't want the duplication and the overhead. - ## Submitting a PR: Probably the smaller the better (within sensible bounds for the nature of your change); at least keep a single feature to a single branch/PR. diff --git a/.github/actions/build-and-test/action.yml b/.github/actions/build-and-test/action.yml new file mode 100644 index 0000000000..92a3e6ad65 --- /dev/null +++ b/.github/actions/build-and-test/action.yml @@ -0,0 +1,43 @@ +name: 'Compile and Test' +description: 'Build the solution and runs the tests' +inputs: + solution: + description: 'The relative path to the solution file' + required: true + buildConfiguration: + description: 'The configuration to use when building' + required: true + nugetKey: + description: The API key to setup with the NUGET_AUTH_TOKEN. + required: false +runs: + using: "composite" + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 3.1.x + 5.x + 6.x + env: + NUGET_AUTH_TOKEN: ${{ inputs.nugetToken }} + + - name: Restore dependencies + shell: pwsh + run: dotnet restore ${{ inputs.solution }} + + - name: Build + shell: pwsh + run: dotnet build ${{ inputs.solution }} --configuration ${{ inputs.buildConfiguration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True + + - name: Test + shell: pwsh + run: dotnet test ${{ inputs.solution }} --configuration ${{ inputs.buildConfiguration }} --no-build --verbosity normal --blame-crash + + - name: Upload Screenshots + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: Screenshots-${{ github.run_number }} + path: ${{ github.workspace }}/MaterialDesignThemes.UITests/bin/${{ inputs.buildConfiguration }}/net5.0-windows/Screenshots diff --git a/.github/actions/push-artifacts/action.yml b/.github/actions/push-artifacts/action.yml new file mode 100644 index 0000000000..a58a771abe --- /dev/null +++ b/.github/actions/push-artifacts/action.yml @@ -0,0 +1,40 @@ +name: 'Compile and Test' +description: 'Build the solution and runs the tests' +inputs: + mdixVersion: + description: 'The version number for the Matrial Design in XAML library' + required: true + mdixColorsVersion: + description: 'The version number for the Matrial Design Colors library' + required: true + mdixMahAppsVersion: + description: 'The version number for the Matrial Design MahApps library' + required: true + demoAppPath: + description: 'The relative path to the compiled version of the demo app' + required: true + nugetKey: + description: 'The NuGet API key' + required: true +runs: + using: "composite" + steps: + - name: Build NuGets + shell: pwsh + run: .\Scripts\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdixVersion }} -MDIXMahAppsVersion ${{ inputs.mdixMahAppsVersion }} -MDIXColorsVersion ${{ inputs.mdixColorsVersion }} + + - name: Upload NuGets + uses: actions/upload-artifact@v2 + with: + name: NuGets-${{ github.run_number }} + path: "*.nupkg" + + - name: Upload Demo App + uses: actions/upload-artifact@v2 + with: + name: DemoApp-${{ github.run_number }} + path: "${{ inputs.demoAppPath }}" + + - name: Publish to NuGet.org + shell: pwsh + run: dotnet nuget push ${{ github.workspace }}\*.nupkg --source https://api.nuget.org/v3/index.json -k ${{ inputs.nugetKey }} --skip-duplicate diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..5fcad17917 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,18 @@ +# .github/release.yml + +changelog: + exclude: + labels: + - ignore-for-release + authors: + - MDIX-SA + - github-actions[bot] + categories: + - title: Key Changes + labels: + - release notes + - title: Breaking Changes + labels: + - breaking change + - visual breaking change + diff --git a/.github/workflows/icon_update.yml b/.github/workflows/icon_update.yml index 3e865bf024..97135c0ea9 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 + dotnet-version: 6.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 deleted file mode 100644 index f32f4a8961..0000000000 --- a/.github/workflows/nightly_release.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Nightly Release - -on: - workflow_dispatch: - schedule: - - cron: '0 9 * * *' - -env: - solution: MaterialDesignToolkit.Full.sln - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' - mdixColorsVersion: '2.0.4' - mdixMahAppsVersion: '0.2.0' - mdixVersion: '4.3.0' - -jobs: - check_for_changes: - if: ${{ github.repository == 'MaterialDesignInXAML/MaterialDesignInXamlToolkit' }} - runs-on: windows-latest - - outputs: - has_changed: ${{ steps.check_tag.outputs.has_changed }} - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - id: check_tag - name: Check nightly_release tag - run: | - $nightlyReleaseHash = $(git rev-parse nightly_release) - $masterHash = $(git rev-parse master) - $hasChanged = ($nightlyReleaseHash -ne $masterHash).ToString().ToLower() - echo "::set-output name=has_changed::$hasChanged" - - build: - needs: [check_for_changes] - if: ${{ needs.check_for_changes.outputs.has_changed == 'true' }} - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup .NET Core 3.1 - 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" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} - - - name: Restore dependencies - run: dotnet restore ${{ env.solution }} - - - name: Build - run: dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:Platform="${{ env.buildPlatform }}" -p:MDIXVersion=${{ env.mdixVersion }}.${{ github.run_number }} -p:MDIXColorsVersion=${{ env.mdixColorsVersion }}.${{ github.run_number }} -p:MDIXMahAppsVersion=${{ env.mdixMahappsVersion }}.${{ github.run_number }} -p:TreatWarningsAsErrors=True - - - name: Test - run: dotnet test ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-build --verbosity detailed --blame-crash - - - name: Upload Screenshots - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: Screenshots-${{ github.run_number }} - path: ${{ github.workspace }}/MaterialDesignThemes.UITests/bin/${{ env.buildConfiguration }}/net5.0-windows/Screenshots - - - name: Build NuGets - run: .\Scripts\BuildNugets.ps1 -MDIXVersion ${{ env.mdixVersion }}-ci${{ github.run_number }} -MDIXMahAppsVersion ${{ env.mdixMahappsVersion }}-ci${{ github.run_number }} -MDIXColorsVersion ${{ env.mdixColorsVersion }}-ci${{ github.run_number }} - - - name: Upload NuGets - uses: actions/upload-artifact@v2 - with: - name: NuGets-${{ github.run_number }} - path: "*.nupkg" - - - name: Upload Demo App - uses: actions/upload-artifact@v2 - with: - name: DemoApp-${{ github.run_number }} - path: "MainDemo.Wpf/bin/${{ env.buildConfiguration }}" - - - name: Publish to NuGet.org - run: dotnet nuget push ${{ github.workspace }}\*.nupkg --source https://api.nuget.org/v3/index.json -k ${{ secrets.PAT }} --skip-duplicate - - - name: Update latest tag - run: | - git config user.name github-actions - git config user.email github-actions@github.com - git tag -f nightly_release master - git push -f --tags \ No newline at end of file diff --git a/.github/workflows/pr_verification.yml b/.github/workflows/pr_verification.yml index 1158cc2441..c96e013221 100644 --- a/.github/workflows/pr_verification.yml +++ b/.github/workflows/pr_verification.yml @@ -8,7 +8,6 @@ on: env: solution: MaterialDesignToolkit.Full.sln - buildPlatform: 'Any CPU' buildConfiguration: 'Release' jobs: @@ -19,32 +18,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 + - name: Build and Test + uses: ./.github/actions/build-and-test + timeout-minutes: 20 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" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} - - - name: Restore dependencies - run: dotnet restore ${{ env.solution }} - - - name: Build - run: dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:Platform="${{ env.buildPlatform }}" -p:TreatWarningsAsErrors=True - - - name: Test - run: dotnet test ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-build --verbosity detailed --blame-crash - - - name: Upload Screenshots - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - name: Screenshots-${{ github.run_number }} - path: ${{ github.workspace }}/MaterialDesignThemes.UITests/bin/${{ env.buildConfiguration }}/net5.0-windows/Screenshots + solution: ${{ env.solution }} + buildConfiguration: ${{ env.buildConfiguration }} + nugetKey: ${{ secrets.PAT }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0b4024fb4..4a5c56b240 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,69 +2,81 @@ name: Release on: workflow_dispatch: + schedule: + - cron: '0 9 * * *' push: tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + 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: + check_for_changes: if: ${{ github.repository == 'MaterialDesignInXAML/MaterialDesignInXamlToolkit' }} runs-on: windows-latest + outputs: + should_run: ${{ github.event_name == 'push' || steps.check_tag.outputs.has_changed }} + steps: - uses: actions/checkout@v2 - - - name: Setup .NET Core 3.1 - 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 + if: ${{ github.event_name != 'push' }} with: - dotnet-version: "5.x" - env: - NUGET_AUTH_TOKEN: ${{secrets.PAT}} + fetch-depth: 0 - - name: Restore dependencies - run: dotnet restore ${{ env.solution }} + - id: check_tag + name: Check nightly_release tag + if: ${{ github.event_name != 'push' }} + run: | + $nightlyReleaseHash = $(git rev-parse nightly_release) + $masterHash = $(git rev-parse master) + $hasChanged = ($nightlyReleaseHash -ne $masterHash).ToString().ToLower() + echo "::set-output name=has_changed::$hasChanged" - - name: Build - run: dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:Platform="${{ env.buildPlatform }}" -p:MDIXVersion=${{ env.mdixVersion }}.${{ github.run_number }} -p:MDIXColorsVersion=${{ env.mdixColorsVersion }}.${{ github.run_number }} -p:MDIXMahAppsVersion=${{ env.mdixMahappsVersion }}.${{ github.run_number }} -p:TreatWarningsAsErrors=True - - - name: Test - run: dotnet test ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-build --verbosity detailed --blame-crash + build: + needs: [check_for_changes] + if: ${{ needs.check_for_changes.outputs.should_run == 'true' }} + runs-on: windows-latest - - name: Upload Screenshots - if: ${{ always() }} - uses: actions/upload-artifact@v2 + steps: + - uses: actions/checkout@v2 with: - name: Screenshots-${{ github.run_number }} - path: ${{ github.workspace }}/MaterialDesignThemes.UITests/bin/${{ env.buildConfiguration }}/net5.0-windows/Screenshots - - - name: Build NuGets - run: .\Scripts\BuildNugets.ps1 -MDIXVersion ${{ env.mdixVersion }} -MDIXMahAppsVersion ${{ env.mdixMahappsVersion }} -MDIXColorsVersion ${{ env.mdixColorsVersion }} + fetch-depth: 0 - - name: Upload NuGets - uses: actions/upload-artifact@v2 + - name: Build and Test + uses: ./.github/actions/build-and-test + timeout-minutes: 20 with: - name: NuGets-${{ github.run_number }} - path: "*.nupkg" + solution: ${{ env.solution }} + buildConfiguration: ${{ env.buildConfiguration }} + nugetKey: ${{ secrets.PAT }} - - name: Upload Demo App - uses: actions/upload-artifact@v2 + - name: Set Nightly Version Numbers + if: ${{ github.event_name != 'push' }} + run: | + echo "mdixVersion=${{ env.mdixVersion }}-ci${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append + echo "mdixColorsVersion=${{ env.mdixColorsVersion }}-ci${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append + echo "mdixMahAppsVersion=${{ env.mdixMahAppsVersion }}-ci${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf-8 -Append + + - name: Push Artifacts + uses: ./.github/actions/push-artifacts + timeout-minutes: 10 with: - name: DemoApp-${{ github.run_number }} - path: "MainDemo.Wpf/bin/${{ env.buildConfiguration }}" + mdixVersion: ${{ env.mdixVersion }} + mdixColorsVersion: ${{ env.mdixColorsVersion }} + mdixMahAppsVersion: ${{ env.mdixMahappsVersion }} + demoAppPath: "MainDemo.Wpf/bin/${{ env.buildConfiguration }}" + nugetKey: ${{ secrets.PAT }} - - name: Publish to NuGet.org - run: dotnet nuget push ${{ github.workspace }}\*.nupkg --source https://api.nuget.org/v3/index.json -k ${{ secrets.PAT }} --skip-duplicate + - name: Update latest tag + if: ${{ github.event_name != 'push' }} + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git tag -f nightly_release master + git push -f --tags \ No newline at end of file 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/MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj b/MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj index 290bced088..a523e8a2fd 100644 --- a/MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj +++ b/MahMaterialDragablzMashUp/MahAppsDragablzDemo.csproj @@ -1,4 +1,4 @@ - + WinExe @@ -8,7 +8,6 @@ true MahMaterialDragablzMashUp MahMaterialDragablzMashUp - true true false diff --git a/MahMaterialDragablzMashUp/MainWindow.xaml b/MahMaterialDragablzMashUp/MainWindow.xaml index 94e5445006..c3068e881b 100644 --- a/MahMaterialDragablzMashUp/MainWindow.xaml +++ b/MahMaterialDragablzMashUp/MainWindow.xaml @@ -15,7 +15,7 @@ - + diff --git a/MainDemo.Wpf/Buttons.xaml b/MainDemo.Wpf/Buttons.xaml index 65f87e0fbf..46ecadf527 100644 --- a/MainDemo.Wpf/Buttons.xaml +++ b/MainDemo.Wpf/Buttons.xaml @@ -729,6 +729,86 @@ + + + + + + + + + + + + + + + + + + + + - - + - - - + + + - - - - - - Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... - + + + + + + Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... + - + - - - + + + - - - - - Praesent sed dui arcu. Vivamus porta auctor sagittis - + + + + + Praesent sed dui arcu. Vivamus porta auctor sagittis + - + - - - + + + - - - + + + - + - - - + + + - - - + + + - - - - - - - + + + + + + + + + + - + materialDesign:ShadowAssist.ShadowDepth="Depth0" + Style="{StaticResource MaterialDesignNavigationRailTabControl}"> + - - - + + + - + - + - - - + + + - + - - - + + + - + - - - + + + - - - + + + + + - + materialDesign:ShadowAssist.ShadowDepth="Depth1" + Style="{StaticResource MaterialDesignNavigationRailTabControl}"> + - - - + + + - + - + - - - + + + - + - - - + + + - + - - - + + + - - - + + + + + - + materialDesign:ShadowAssist.ShadowDepth="Depth2" + Style="{StaticResource MaterialDesignNavigationRailTabControl}"> + - - - + + + - + - + - - - + + + - + - - - + + + - + - - - + + + - - - + + + + + - + materialDesign:ShadowAssist.ShadowDepth="Depth3" + Style="{StaticResource MaterialDesignNavigationRailTabControl}"> + - - - + + + - + - + - - - + + + - + - - - + + + - + - - - + + + - - - - + + + + diff --git a/MainDemo.Wpf/Pickers.xaml b/MainDemo.Wpf/Pickers.xaml index 4bfe6b7813..d87b2b3e98 100644 --- a/MainDemo.Wpf/Pickers.xaml +++ b/MainDemo.Wpf/Pickers.xaml @@ -296,13 +296,13 @@ HorizontalAlignment="Right" Orientation="Horizontal"> diff --git a/MainDemo.Wpf/TransitionsDemo/Slide2_Intro.xaml b/MainDemo.Wpf/TransitionsDemo/Slide2_Intro.xaml index 02a88855a2..de426530b5 100644 --- a/MainDemo.Wpf/TransitionsDemo/Slide2_Intro.xaml +++ b/MainDemo.Wpf/TransitionsDemo/Slide2_Intro.xaml @@ -18,13 +18,13 @@ TextWrapping="Wrap"> The transition will originate from where the user clicks the button. Experiment with the back/forward buttons. - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..4738f0e9f8 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/Buttons.xaml @@ -0,0 +1,1095 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..08f4492862 --- /dev/null +++ b/MaterialDesign3.Demo.Wpf/ColorZones.xaml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +