From aff9f5a4e8cf11a923b4b164767eb950ca0e7fa0 Mon Sep 17 00:00:00 2001 From: Kevin B Date: Sun, 15 Jan 2023 20:39:45 -0800 Subject: [PATCH 01/36] Adding functionality to close the milestone on release. --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6726ded82..402e30845b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -212,7 +212,7 @@ jobs: dotnet nuget push nugets/*.nupkg --api-key ${{ secrets.PAT }} --source https://api.nuget.org/v3/index.json --skip-duplicate publish_release: - needs: [update_wiki, push_nugets] + needs: [create_release] runs-on: ubuntu-latest name: Publish Release environment: production @@ -221,3 +221,17 @@ jobs: - name: Publish Release run: | gh release edit v${{ inputs.milestone }} --repo '${{ github.repository }}' --draft=false + + close_milestone: + needs: [create_release] + runs-on: ubuntu-latest + name: Close Milestone + environment: production + + steps: + - name: Close Milestone + run: | + gh extension install valeriobelli/gh-milestone + $milestones = $(gh milestone list --json number,title) | ConvertFrom-Json + $milestoneNumber = ($milestones | Where-Object { $_.title -eq "${{ inputs.milestone }}" }).number + gh milestone edit $milestoneNumber --state closed From a854b66caf59d7a95429d0d0e01da3581f3d8a5d Mon Sep 17 00:00:00 2001 From: Kevin B Date: Sun, 15 Jan 2023 21:22:59 -0800 Subject: [PATCH 02/36] Bump version numbers post release --- .github/workflows/release.yml | 43 ++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 402e30845b..9a24ab59f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,7 +191,7 @@ jobs: run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git commit -m "Update Wiki with icon changes for ${{ inputs.milestone }}" --all + git commit -m "[automated] Update Wiki with icon changes for ${{ inputs.milestone }}" --all git push push_nugets: @@ -235,3 +235,44 @@ jobs: $milestones = $(gh milestone list --json number,title) | ConvertFrom-Json $milestoneNumber = ($milestones | Where-Object { $_.title -eq "${{ inputs.milestone }}" }).number gh milestone edit $milestoneNumber --state closed + + update_version_numbers: + needs: [create_release] + runs-on: ubuntu-latest + name: Update Version Numbers + environment: production + + steps: + - name: Increment Version Numbers + run: | + function Update-Version { + param ( + [string]$Prefix + ) + $workflowPath = "./.github/workflows/get_versions.yml" + $workflowContent = Get-Content -Path $workflowPath + + $versionPattern = '"(\d+\.\d+\.)(\d+)"' + $pattern = "$Prefix`: $versionPattern" + $match = $workflowContent -match $pattern + + if ($match[0] -match $versionPattern) { + $newVersion = $Matches[1] + ([int]$Matches[2] + 1) + $workflowContent = $workflowContent -replace $pattern,"$Prefix`: `"$newVersion`"" + } else { + Write-Error "Failed to update $Prefix version" + } + + Set-Content -Path $workflowPath -Value $workflowContent + } + + Update-Version -Prefix "mdix-version" + Update-Version -Prefix "mdix-colors-version" + Update-Version -Prefix "mdix-mahapps-version" + + - name: Push Changes + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "[automated] Increment version numbers after release of ${{ inputs.milestone }}" --all + git push \ No newline at end of file From 82e4f0ee6bd8481b907ded33ef4f65f8e1c64163 Mon Sep 17 00:00:00 2001 From: Kevin Bost Date: Sun, 15 Jan 2023 21:24:06 -0800 Subject: [PATCH 03/36] Version number changes after running script --- .github/workflows/get_versions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/get_versions.yml b/.github/workflows/get_versions.yml index fd3b057cbe..17af698618 100644 --- a/.github/workflows/get_versions.yml +++ b/.github/workflows/get_versions.yml @@ -23,9 +23,9 @@ jobs: getting_versions: env: #Update these base version numbers - mdix-version: "4.7.1" - mdix-colors-version: "2.1.1" - mdix-mahapps-version: "0.2.7" + mdix-version: "4.7.2" + mdix-colors-version: "2.1.2" + mdix-mahapps-version: "0.2.8" name: Set version numbers runs-on: ubuntu-latest defaults: From e02fd04df54428c862c777d6bd2f2acd0dc7d1fc Mon Sep 17 00:00:00 2001 From: Material Design in XAML SA <52977350+MDIX-SA@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:12:27 -0800 Subject: [PATCH 04/36] [bot] Pack Icon update (#3050) Co-authored-by: github-actions[bot] --- MaterialDesignThemes.Wpf/PackIconDataFactory.cs | 5 +++++ MaterialDesignThemes.Wpf/PackIconKind.cs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs index 35eae24ba2..103f950c46 100644 --- a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs +++ b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs @@ -4516,6 +4516,7 @@ internal static class PackIconDataFactory {PackIconKind.MonitorSpeaker,"M3 2C1.9 2 1 2.9 1 4V16C1 17.1 1.9 18 3 18H10V20H8V22H12V16H3V4H21V7H23V4C23 2.9 22.1 2 21 2H3M21 9H16C14.9 9 14 9.9 14 11V20C14 21.1 14.9 22 16 22H21C22.1 22 23 21.1 23 20V11C23 9.9 22.1 9 21 9M18.5 10.5C19.3 10.5 20 11.2 20 12S19.3 13.5 18.5 13.5 17 12.8 17 12 17.7 10.5 18.5 10.5M18.5 20.5C16.8 20.5 15.5 19.2 15.5 17.5C15.5 15.9 16.8 14.5 18.4 14.5H18.5C20.2 14.5 21.5 15.8 21.5 17.5S20.2 20.5 18.5 20.5M18.5 16C17.7 16 17 16.7 17 17.5S17.7 19 18.5 19 20 18.3 20 17.5 19.3 16 18.5 16Z"}, {PackIconKind.MonitorSpeakerOff,"M2.4 1.7L1.1 3L1.2 3.1C1.1 3.4 1 3.7 1 4V16C1 17.1 1.9 18 3 18H10V20H8V22H12V16H3V4.9L14 15.9V20C14 21.1 14.9 22 16 22H20.1L20.8 22.7C20.8 22.7 22 21.7 22.2 21.5L2.4 1.7M18.5 20.5C16.8 20.5 15.5 19.2 15.5 17.5V17.4L18.6 20.5H18.5M23 4V7H21V4H7.2L5.2 2H21C22.1 2 23 2.9 23 4M21 9H16C15 9 14.1 9.8 14 10.8L17.8 14.6C18 14.5 18.2 14.5 18.5 14.5H18.6C20.3 14.5 21.6 15.8 21.6 17.5C21.6 17.7 21.6 18 21.5 18.2L23.1 19.8V11C23 9.9 22.1 9 21 9M18.5 13.5C17.7 13.5 17 12.8 17 12S17.7 10.5 18.5 10.5 20 11.2 20 12 19.3 13.5 18.5 13.5Z"}, {PackIconKind.MonitorStar,"M21,16V4H3V16H21M21,2A2,2 0 0,1 23,4V16A2,2 0 0,1 21,18H14V20H16V22H8V20H10V18H3C1.89,18 1,17.1 1,16V4C1,2.89 1.89,2 3,2H21M12.97,9H16L13.53,10.76L14.47,13.67L12,11.87L9.53,13.67L10.47,10.76L8,9H11.03L12,6L12.97,9Z"}, + {PackIconKind.MonitorVertical,"M16 2H8C6.89 2 6 2.89 6 4V16C6 17.11 6.9 18 8 18H10V20H8V22H16V20H14V18H16C17.11 18 18 17.11 18 16V4C18 2.89 17.1 2 16 2M16 16H8V4H16V16Z"}, {PackIconKind.MoonFirstQuarter,"M12 2V22A10 10 0 0 0 12 2Z"}, {PackIconKind.MoonFull,"M12 2A10 10 0 1 1 2 12A10 10 0 0 1 12 2Z"}, {PackIconKind.MoonLastQuarter,"M12 2A10 10 0 0 0 12 22Z"}, @@ -5428,6 +5429,8 @@ internal static class PackIconDataFactory {PackIconKind.ReceiptClock,"M3 22L4.5 20.5L6 22L7.5 20.5L9 22L10.58 20.42C10.72 20.61 10.88 20.78 11.05 20.95C12.36 22.26 14.14 23 16 23C19.86 23 23 19.87 23 16C23 14.17 22.28 12.41 21 11.1V2L19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22M20.85 16C20.85 16.64 20.73 17.27 20.5 17.86C20.24 18.44 19.88 19 19.43 19.43C19 19.88 18.44 20.24 17.86 20.5C17.27 20.73 16.64 20.85 16 20.85C13.32 20.85 11.15 18.68 11.15 16C11.15 14.71 11.66 13.5 12.57 12.57C13.5 11.66 14.71 11.15 16 11.15C18.67 11.15 20.85 13.32 20.85 16M15 16.69V13H16.5V15.82L18.94 17.23L18.19 18.53L15 16.69Z"}, {PackIconKind.ReceiptClockOutline,"M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.58 20.42C10.72 20.61 10.88 20.78 11.05 20.95C12.36 22.26 14.14 23 16 23C19.86 23 23 19.87 23 16C23 14.17 22.28 12.41 21 11.1V2L19.5 3.5M19 9.68C18.07 9.24 17.05 9 16 9C12.14 9 9 12.13 9 16C9 17.05 9.24 18.07 9.68 19H5V5H19V9.68M20.85 16C20.85 16.64 20.73 17.27 20.5 17.86C20.24 18.44 19.88 19 19.43 19.43C19 19.88 18.44 20.24 17.86 20.5C17.27 20.73 16.64 20.85 16 20.85C13.32 20.85 11.15 18.68 11.15 16C11.15 14.71 11.66 13.5 12.57 12.57C13.5 11.66 14.71 11.15 16 11.15C18.67 11.15 20.85 13.32 20.85 16M15 16.69V13H16.5V15.82L18.94 17.23L18.19 18.53L15 16.69Z"}, {PackIconKind.ReceiptOutline,"M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.5 20.5L12 22L13.5 20.5L15 22L16.5 20.5L18 22L19.5 20.5L21 22V2L19.5 3.5M19 19H5V5H19V19Z"}, + {PackIconKind.ReceiptSend,"M4.5 20.5L3 22V2L4.5 3.5L6 2L7.5 3.5L9 2L10.5 3.5L12 2L13.5 3.5L15 2L16.5 3.5L18 2L19.5 3.5L21 2V14.26L12 9.76V22L10.5 20.5L9 22L7.5 20.5L6 22L4.5 20.5M14 19L18 18L14 17V13L24 18L14 23V19Z"}, + {PackIconKind.ReceiptSendOutline,"M18 2L19.5 3.5L21 2V14.26L19 13.26V5H5V19H12V22L10.5 20.5L9 22L7.5 20.5L6 22L4.5 20.5L3 22V2L4.5 3.5L6 2L7.5 3.5L9 2L10.5 3.5L12 2L13.5 3.5L15 2L16.5 3.5L18 2M14 19L18 18L14 17V13L24 18L14 23V19Z"}, {PackIconKind.ReceiptText,"M3,22L4.5,20.5L6,22L7.5,20.5L9,22L10.5,20.5L12,22L13.5,20.5L15,22L16.5,20.5L18,22L19.5,20.5L21,22V2L19.5,3.5L18,2L16.5,3.5L15,2L13.5,3.5L12,2L10.5,3.5L9,2L7.5,3.5L6,2L4.5,3.5L3,2M18,9H6V7H18M18,13H6V11H18M18,17H6V15H18V17Z"}, {PackIconKind.ReceiptTextArrowLeft,"M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.5 20.5L12 22L13.26 20.74C13.09 20.18 13 19.59 13 19C13 18.32 13.12 17.64 13.34 17H6V15H14.53C15.67 13.73 17.29 13 19 13C19.68 13 20.36 13.12 21 13.34V2L19.5 3.5M18 13H6V11H18V13M18 9H6V7H18V9M18 18V16L15 19L18 22V20H22V18H18Z"}, {PackIconKind.ReceiptTextArrowLeftOutline,"M12 22L13.26 20.74C13.1 20.22 13 19.66 13 19.09H5V4.91H19V13C19.7 13 20.37 13.13 21 13.35V2L19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.5 20.5L12 22M13.35 17C13.61 16.25 14 15.58 14.54 15H6V17H13.35M18 11H6V13H18V11M18 7H6V9H18V7M18 20V22L15 19L18 16V18H22V20H18Z"}, @@ -5446,6 +5449,8 @@ internal static class PackIconDataFactory {PackIconKind.ReceiptTextPlusOutline,"M18 15V18H15V20H18V23H20V20H23V18H20V15H18M13.26 20.74L12 22L10.5 20.5L9 22L7.5 20.5L6 22L4.5 20.5L3 22V2L4.5 3.5L6 2L7.5 3.5L9 2L10.5 3.5L12 2L13.5 3.5L15 2L16.5 3.5L18 2L19.5 3.5L21 2V13.35C20.37 13.13 19.7 13 19 13V5H5V19H13C13 19.57 13.1 20.22 13.26 20.74M14.54 15C14 15.58 13.61 16.25 13.35 17H6V15H14.54M6 11H18V13H6V11M6 7H18V9H6V7Z"}, {PackIconKind.ReceiptTextRemove,"M21.12 15.46L19 17.59L16.88 15.47L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.5 20.5L12 22L13.26 20.74C13.09 20.18 13 19.59 13 19C13 18.32 13.12 17.64 13.34 17H6V15H14.53C15.67 13.73 17.29 13 19 13C19.68 13 20.36 13.12 21 13.34V2L19.5 3.5M18 13H6V11H18V13M18 9H6V7H18V9Z"}, {PackIconKind.ReceiptTextRemoveOutline,"M21.12 15.46L19 17.59L16.88 15.47L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46M13.26 20.74L12 22L10.5 20.5L9 22L7.5 20.5L6 22L4.5 20.5L3 22V2L4.5 3.5L6 2L7.5 3.5L9 2L10.5 3.5L12 2L13.5 3.5L15 2L16.5 3.5L18 2L19.5 3.5L21 2V13.35C20.37 13.13 19.7 13 19 13V5H5V19H13C13 19.57 13.1 20.22 13.26 20.74M14.54 15C14 15.58 13.61 16.25 13.35 17H6V15H14.54M6 11H18V13H6V11M6 7H18V9H6V7Z"}, + {PackIconKind.ReceiptTextSend,"M4.5 20.5L3 22V2L4.5 3.5L6 2L7.5 3.5L9 2L10.5 3.5L12 2L13.5 3.5L15 2L16.5 3.5L18 2L19.5 3.5L21 2V14.26L18 12.76V11H6V13H12V15H6V17H12V22L10.5 20.5L9 22L7.5 20.5L6 22L4.5 20.5M6 7V9H18V7H6M14 13L24 18L14 23V19L18 18L14 17V13Z"}, + {PackIconKind.ReceiptTextSendOutline,"M19.5 3.5L18 2L16.5 3.5L15 2L13.5 3.5L12 2L10.5 3.5L9 2L7.5 3.5L6 2L4.5 3.5L3 2V22L4.5 20.5L6 22L7.5 20.5L9 22L10.5 20.5L12 22V19.09H5V4.91H19V13.26L21 14.26V2L19.5 3.5M14 23V19L18 18L14 17V13L24 18L14 23M12 11V13H6V11H12M6 17V15H12V17H6M18 7V9H6V7H18Z"}, {PackIconKind.Record,"M19,12C19,15.86 15.86,19 12,19C8.14,19 5,15.86 5,12C5,8.14 8.14,5 12,5C15.86,5 19,8.14 19,12Z"}, {PackIconKind.RecordCircle,"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z"}, {PackIconKind.RecordCircleOutline,"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9Z"}, diff --git a/MaterialDesignThemes.Wpf/PackIconKind.cs b/MaterialDesignThemes.Wpf/PackIconKind.cs index a041e0f2a7..c28baa9459 100644 --- a/MaterialDesignThemes.Wpf/PackIconKind.cs +++ b/MaterialDesignThemes.Wpf/PackIconKind.cs @@ -8428,6 +8428,7 @@ public enum PackIconKind MonitorSpeakerOff, MonitorStar, MonitorFavorite=MonitorStar, + MonitorVertical, MoonFirstQuarter, MoonFull, MoonLastQuarter, @@ -10248,6 +10249,8 @@ public enum PackIconKind ClothOutline=ReceiptOutline, FabricOutline=ReceiptOutline, SwatchOutline=ReceiptOutline, + ReceiptSend, + ReceiptSendOutline, ReceiptText, Invoice=ReceiptText, ReceiptTextArrowLeft, @@ -10292,6 +10295,8 @@ public enum PackIconKind InvoiceRemove=ReceiptTextRemove, ReceiptTextRemoveOutline, InvoiceRemoveOutline=ReceiptTextRemoveOutline, + ReceiptTextSend, + ReceiptTextSendOutline, Record, FiberManualRecord=Record, RecordCircle, From 0dd24388171e248e6c5a7c6ee4439fafa54a5734 Mon Sep 17 00:00:00 2001 From: Nicolai Henriksen Date: Thu, 19 Jan 2023 05:36:44 +0100 Subject: [PATCH 05/36] DataGrid style cleanup (#3033) * Introduce attached property for ComboBox column style - DataGrid Similar to text and checkbox columns, the auto-generated style can now be set using an attached property. * Introduce DataGridAssist.ApplyMaterialDesignColumnStyles attached property The attached property, when set, inspects all columns of the data grid and applies MDIX styles if the default style has not been overridden. This works both for auto-generated and explicitly-defined columns. * Fix nullability error when building in pipeline * Fixed another nullable build error found in the pipeline * Refactor DataGridAssist.ApplyMaterialDesignColumnStyles to use AP The assist class now uses the attached properties associated with the corresponding DataGrid. Introduced a ColumnUpdater type and a private DP in order to have a reference to the DataGrid in the Columns_CollectionChanged() callback and to do proper housekeeping/cleanup to avoid memory leaks. * Update MaterialDesignThemes.Wpf/DataGridAssist.cs Co-authored-by: Kevin B * Refactor to use local function to capture "dataGrid" variable Removing the ColumnUpdater in place of a local function which captures the variable nicely. This removes the need for the ColumnUpdater type entirely, and removes the associated attached property. Co-authored-by: Kevin B --- MainDemo.Wpf/DataGrids.xaml | 17 +-- MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs | 2 + MainDemo.Wpf/Domain/SelectableViewModel.cs | 17 +++ MaterialDesignThemes.Wpf/DataGridAssist.cs | 142 ++++++++++++++++++ .../Themes/MaterialDesignTheme.DataGrid.xaml | 5 +- 5 files changed, 171 insertions(+), 12 deletions(-) diff --git a/MainDemo.Wpf/DataGrids.xaml b/MainDemo.Wpf/DataGrids.xaml index f03bc2679b..d33b50ed9b 100644 --- a/MainDemo.Wpf/DataGrids.xaml +++ b/MainDemo.Wpf/DataGrids.xaml @@ -43,9 +43,8 @@ - + + @@ -59,10 +58,8 @@ - + + - + @@ -188,7 +183,7 @@ + ItemsSource="{Binding Items4}" /> diff --git a/MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs b/MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs index 443e5f08ef..bbb199efa3 100644 --- a/MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs +++ b/MainDemo.Wpf/Domain/ListsAndGridsViewModel.cs @@ -9,6 +9,7 @@ public ListsAndGridsViewModel() Items1 = CreateData(); Items2 = CreateData(); Items3 = CreateData(); + Items4 = CreateData(); foreach (var model in Items1) { @@ -81,6 +82,7 @@ private static ObservableCollection CreateData() public ObservableCollection Items1 { get; } public ObservableCollection Items2 { get; } public ObservableCollection Items3 { get; } + public ObservableCollection Items4 { get; } public IEnumerable Foods => new[] { "Burger", "Fries", "Shake", "Lettuce" }; diff --git a/MainDemo.Wpf/Domain/SelectableViewModel.cs b/MainDemo.Wpf/Domain/SelectableViewModel.cs index b817735d94..9b989fcd7d 100644 --- a/MainDemo.Wpf/Domain/SelectableViewModel.cs +++ b/MainDemo.Wpf/Domain/SelectableViewModel.cs @@ -9,6 +9,7 @@ public class SelectableViewModel : ViewModelBase private double _numeric; private string? _food; private string? _files; + private VehicleType _vehicleType; public bool IsSelected { @@ -51,4 +52,20 @@ public string? Files get => _files; set => SetProperty(ref _files, value); } + + public VehicleType VehicleType + { + get => _vehicleType; + set => SetProperty(ref _vehicleType, value); + } +} + +public enum VehicleType +{ + Car, + Bus, + Motorcycle, + Van, + Scooter, + Truck } diff --git a/MaterialDesignThemes.Wpf/DataGridAssist.cs b/MaterialDesignThemes.Wpf/DataGridAssist.cs index 52a155da6f..f0c701a7ef 100644 --- a/MaterialDesignThemes.Wpf/DataGridAssist.cs +++ b/MaterialDesignThemes.Wpf/DataGridAssist.cs @@ -1,3 +1,4 @@ +using System.Collections.Specialized; using System.Windows.Media; namespace MaterialDesignThemes.Wpf; @@ -120,6 +121,147 @@ private static void SetGeneratedTextColumnEditingStyle(object? sender, DataGridA } #endregion + #region AttachedProperty : AutoGeneratedComboBoxStyleProperty + public static readonly DependencyProperty AutoGeneratedComboBoxStyleProperty + = DependencyProperty.RegisterAttached("AutoGeneratedComboBoxStyle", typeof(Style), typeof(DataGridAssist), + new PropertyMetadata(default(Style), AutoGeneratedComboBoxStylePropertyChangedCallback)); + + public static Style GetAutoGeneratedComboBoxStyle(DataGrid element) + => (Style)element.GetValue(AutoGeneratedComboBoxStyleProperty); + public static void SetAutoGeneratedComboBoxStyle(DataGrid element, Style value) + => element.SetValue(AutoGeneratedComboBoxStyleProperty, value); + + private static void AutoGeneratedComboBoxStylePropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var dataGrid = (DataGrid)d; + + dataGrid.AutoGeneratingColumn -= SetGeneratedComboBoxColumnStyle; + dataGrid.AutoGeneratingColumn += SetGeneratedComboBoxColumnStyle; + } + + private static void SetGeneratedComboBoxColumnStyle(object? sender, DataGridAutoGeneratingColumnEventArgs e) + { + if (e.Column is System.Windows.Controls.DataGridComboBoxColumn column && + sender is DataGrid dataGrid) + { + column.ElementStyle = GetAutoGeneratedComboBoxStyle(dataGrid); + } + } + #endregion + + #region AttachedProperty : AutoGeneratedEditingComboBoxStyleProperty + public static readonly DependencyProperty AutoGeneratedEditingComboBoxStyleProperty + = DependencyProperty.RegisterAttached("AutoGeneratedEditingComboBoxStyle", typeof(Style), typeof(DataGridAssist), + new PropertyMetadata(default(Style), AutoGeneratedEditingComboBoxStylePropertyChangedCallback)); + + public static Style GetAutoGeneratedEditingComboBoxStyle(DataGrid element) + => (Style)element.GetValue(AutoGeneratedEditingComboBoxStyleProperty); + public static void SetAutoGeneratedEditingComboBoxStyle(DataGrid element, Style value) + => element.SetValue(AutoGeneratedEditingComboBoxStyleProperty, value); + + private static void AutoGeneratedEditingComboBoxStylePropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var dataGrid = (DataGrid)d; + + dataGrid.AutoGeneratingColumn -= SetGeneratedComboBoxColumnEditingStyle; + dataGrid.AutoGeneratingColumn += SetGeneratedComboBoxColumnEditingStyle; + } + + private static void SetGeneratedComboBoxColumnEditingStyle(object? sender, DataGridAutoGeneratingColumnEventArgs e) + { + if (e.Column is System.Windows.Controls.DataGridComboBoxColumn column && + sender is DataGrid dataGrid) + { + column.EditingElementStyle = GetAutoGeneratedEditingComboBoxStyle(dataGrid); + } + } + #endregion + + #region AttachedProperty : ApplyMaterialDesignColumnStylesProperty + public static readonly DependencyProperty ApplyMaterialDesignColumnStylesProperty + = DependencyProperty.RegisterAttached("ApplyMaterialDesignColumnStyles", typeof(bool), typeof(DataGridAssist), + new PropertyMetadata(default(bool), ApplyMaterialDesignColumnStylesPropertyChangedCallback)); + + public static void SetApplyMaterialDesignColumnStyles(DataGrid element, bool value) + => element.SetValue(ApplyMaterialDesignColumnStylesProperty, value); + + public static bool GetApplyMaterialDesignColumnStyles(DataGrid element) + => (bool) element.GetValue(ApplyMaterialDesignColumnStylesProperty); + + private static void ApplyMaterialDesignColumnStylesPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var dataGrid = (DataGrid)d; + dataGrid.Columns.CollectionChanged -= ColumnsCollectionChanged; + if (Equals(true, e.NewValue)) + { + dataGrid.Columns.CollectionChanged += ColumnsCollectionChanged; // Auto-generated columns are added later in the chain, thus we subscribe to changes. + foreach (var column in dataGrid.Columns) + { + ApplyMaterialDesignColumnStyleForColumn(dataGrid, column); + } + } + + void ColumnsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) + { + foreach (DataGridColumn column in e.NewItems?.OfType() ?? Enumerable.Empty()) + { + ApplyMaterialDesignColumnStyleForColumn(dataGrid, column); + } + } + } + + private static void ApplyMaterialDesignColumnStyleForColumn(DataGrid dataGrid, DataGridColumn column) + { + Style defaultElementStyle = (Style)DataGridBoundColumn.ElementStyleProperty.GetMetadata(column.GetType()).DefaultValue; + Style defaultEditingElementStyle = (Style)DataGridBoundColumn.EditingElementStyleProperty.GetMetadata(column.GetType()).DefaultValue; + + bool applyElementStyle; + bool applyEditingElementStyle; + switch (column) + { + case DataGridCheckBoxColumn checkBoxColumn: + applyElementStyle = Equals(checkBoxColumn.ElementStyle, defaultElementStyle); + applyEditingElementStyle = Equals(checkBoxColumn.EditingElementStyle, defaultEditingElementStyle); + if (applyElementStyle && GetAutoGeneratedCheckBoxStyle(dataGrid) is { } checkBoxElementStyle) + { + checkBoxColumn.ElementStyle = checkBoxElementStyle; + } + + if (applyEditingElementStyle && GetAutoGeneratedEditingCheckBoxStyle(dataGrid) is { } checkBoxEditingElementStyle) + { + checkBoxColumn.EditingElementStyle = checkBoxEditingElementStyle; + } + break; + case System.Windows.Controls.DataGridTextColumn textColumn: + applyElementStyle = Equals(textColumn.ElementStyle, defaultElementStyle); + applyEditingElementStyle = Equals(textColumn.EditingElementStyle, defaultEditingElementStyle); + if (applyElementStyle && GetAutoGeneratedTextStyle(dataGrid) is { } textElementStyle) + { + textColumn.ElementStyle = textElementStyle; + } + + if (applyEditingElementStyle && GetAutoGeneratedEditingTextStyle(dataGrid) is { } textEditingElementStyle) + { + textColumn.EditingElementStyle = textEditingElementStyle; + } + break; + case System.Windows.Controls.DataGridComboBoxColumn comboBoxColumn: + applyElementStyle = Equals(comboBoxColumn.ElementStyle, defaultElementStyle); + applyEditingElementStyle = Equals(comboBoxColumn.EditingElementStyle, defaultEditingElementStyle); + if (applyElementStyle && GetAutoGeneratedComboBoxStyle(dataGrid) is { } comboBoxElementStyle) + { + comboBoxColumn.ElementStyle = comboBoxElementStyle; + } + + if (applyEditingElementStyle && GetAutoGeneratedEditingComboBoxStyle(dataGrid) is { } comboBoxEditingElementStyle) + { + comboBoxColumn.EditingElementStyle = comboBoxEditingElementStyle; + } + break; + } + } + #endregion + #region AttachedProperty : CellPaddingProperty public static readonly DependencyProperty CellPaddingProperty = DependencyProperty.RegisterAttached("CellPadding", typeof(Thickness), typeof(DataGridAssist), diff --git a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml index 7356c60bca..088cbc3674 100644 --- a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml +++ b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DataGrid.xaml @@ -1,4 +1,4 @@ - @@ -553,6 +553,9 @@ + + + From fbee7ce90d84205cce506fbc83e7bf40c2ce4ab0 Mon Sep 17 00:00:00 2001 From: Kevin B Date: Wed, 18 Jan 2023 21:10:14 -0800 Subject: [PATCH 06/36] Update get_versions.yml Bumping to 4.8.0 --- .github/workflows/get_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/get_versions.yml b/.github/workflows/get_versions.yml index 17af698618..1463985a7b 100644 --- a/.github/workflows/get_versions.yml +++ b/.github/workflows/get_versions.yml @@ -23,7 +23,7 @@ jobs: getting_versions: env: #Update these base version numbers - mdix-version: "4.7.2" + mdix-version: "4.8.0" mdix-colors-version: "2.1.2" mdix-mahapps-version: "0.2.8" name: Set version numbers From 92d5cc7cc248f8709c742167e5e98ca15fee8d1e Mon Sep 17 00:00:00 2001 From: Material Design in XAML SA <52977350+MDIX-SA@users.noreply.github.com> Date: Sat, 21 Jan 2023 00:37:13 -0800 Subject: [PATCH 07/36] [bot] Pack Icon update (#3057) Co-authored-by: github-actions[bot] --- MaterialDesignThemes.Wpf/PackIconDataFactory.cs | 9 +++++++++ MaterialDesignThemes.Wpf/PackIconKind.cs | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs index 103f950c46..b603509a56 100644 --- a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs +++ b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs @@ -933,6 +933,8 @@ internal static class PackIconDataFactory {PackIconKind.BellRingOutline,"M10,21H14A2,2 0 0,1 12,23A2,2 0 0,1 10,21M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M17,11A5,5 0 0,0 12,6A5,5 0 0,0 7,11V18H17V11M19.75,3.19L18.33,4.61C20.04,6.3 21,8.6 21,11H23C23,8.07 21.84,5.25 19.75,3.19M1,11H3C3,8.6 3.96,6.3 5.67,4.61L4.25,3.19C2.16,5.25 1,8.07 1,11Z"}, {PackIconKind.BellSleep,"M10,21H14A2,2 0 0,1 12,23A2,2 0 0,1 10,21M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M15,9H9V11H12.24L9,13.7V16H15V14H11.76L15,11.3V9Z"}, {PackIconKind.BellSleepOutline,"M10,21H14A2,2 0 0,1 12,23A2,2 0 0,1 10,21M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M17,11A5,5 0 0,0 12,6A5,5 0 0,0 7,11V18H17V11M9,9V11H12.24L9,13.7V16H15V14H11.76L15,11.3V9H9Z"}, + {PackIconKind.Bench,"M23 13H1V15H3V19H5V15H19V19H21V15H23V13Z"}, + {PackIconKind.BenchBack,"M4 5C3.45 5 3 5.45 3 6V10C3 10.55 3.45 11 4 11H5V13H1V15H3V19H5V15H19V19H21V15H23V13H19V11H20C20.55 11 21 10.55 21 10V6C21 5.45 20.55 5 20 5H4M17 11V13H7V11H17Z"}, {PackIconKind.Beta,"M9.23,17.59V23.12H6.88V6.72C6.88,5.27 7.31,4.13 8.16,3.28C9,2.43 10.17,2 11.61,2C13,2 14.07,2.34 14.87,3C15.66,3.68 16.05,4.62 16.05,5.81C16.05,6.63 15.79,7.4 15.27,8.11C14.75,8.82 14.08,9.31 13.25,9.58V9.62C14.5,9.82 15.47,10.27 16.13,11C16.79,11.71 17.12,12.62 17.12,13.74C17.12,15.06 16.66,16.14 15.75,16.97C14.83,17.8 13.63,18.21 12.13,18.21C11.07,18.21 10.1,18 9.23,17.59M10.72,10.75V8.83C11.59,8.72 12.3,8.4 12.87,7.86C13.43,7.31 13.71,6.7 13.71,6C13.71,4.62 13,3.92 11.6,3.92C10.84,3.92 10.25,4.16 9.84,4.65C9.43,5.14 9.23,5.82 9.23,6.71V15.5C10.14,16.03 11.03,16.29 11.89,16.29C12.73,16.29 13.39,16.07 13.86,15.64C14.33,15.2 14.56,14.58 14.56,13.79C14.56,12 13.28,11 10.72,10.75Z"}, {PackIconKind.Betamax,"M4,5A2,2 0 0,0 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7A2,2 0 0,0 20,5H4M8,9A4,4 0 0,1 12,13A4,4 0 0,1 8,17A4,4 0 0,1 4,13A4,4 0 0,1 8,9M13,9H20V17H13V9M8,11A2,2 0 0,0 6,13A2,2 0 0,0 8,15A2,2 0 0,0 10,13A2,2 0 0,0 8,11Z"}, {PackIconKind.Biathlon,"M12.88,3.64C13.65,3.64 14.28,4.27 14.28,5.04C14.28,5.81 13.65,6.44 12.88,6.44C12.11,6.44 11.5,5.81 11.5,5.04C11.5,4.27 12.11,3.64 12.88,3.64M15,13H16.5V19H15V13M15,8.5H16.5V10H15V8.5M10.04,2.6L8,2.04L6.06,8.58L3.9,11.42L7.17,12.37L10.04,2.6M19.67,18.55C19.31,18.93 18.88,19.5 18.4,19.7C17.91,19.92 17.54,20 17,20H13.5L13.43,17C13.42,16.83 13.37,16.67 13.28,16.5L10.88,12.24L11.76,9.5C12.34,10.55 13,11.73 13.06,11.83C13.21,12 13.45,12.13 13.69,12.13H15.9A0.81,0.81 0 0,0 16.71,11.32C16.71,10.9 16.38,10.56 15.96,10.53L14.29,10.4L12.4,7C12.4,7 12,6.42 11.14,6.42C10.27,6.42 10,6.84 9.83,7.42L6,20H3V22H17C18.37,22 19.53,21.34 20.5,20.37L19.67,18.55M9.75,14.39L11.62,17.39L11.75,20H7.75L9.75,14.39Z"}, @@ -943,6 +945,9 @@ internal static class PackIconDataFactory {PackIconKind.BicyclePennyFarthing,"M15.5 5.06V2H12V4H13.5V5.04C12.71 5.11 11.94 5.27 11.2 5.5C11.03 5.2 10.72 5 10.36 5H7C6.45 5 6 5.45 6 6S6.45 7 7 7H8.05C5.09 9 3.12 12.36 3 16.18C1.85 16.59 1 17.69 1 19C1 20.66 2.34 22 4 22S7 20.66 7 19C7 17.7 6.17 16.61 5 16.19C5.07 14.67 5.46 13.25 6.14 12C6.05 12.5 6 13 6 13.5C6 18.19 9.81 22 14.5 22C19.19 22 23 18.19 23 13.5C23 9.14 19.72 5.56 15.5 5.06M4 20C3.45 20 3 19.55 3 19S3.45 18 4 18 5 18.45 5 19 4.55 20 4 20M14.5 20C10.92 20 8 17.08 8 13.5C8 10.26 10.39 7.57 13.5 7.09V15H15.5V7.09C18.61 7.57 21 10.26 21 13.5C21 17.08 18.08 20 14.5 20Z"}, {PackIconKind.Bike,"M5,20.5A3.5,3.5 0 0,1 1.5,17A3.5,3.5 0 0,1 5,13.5A3.5,3.5 0 0,1 8.5,17A3.5,3.5 0 0,1 5,20.5M5,12A5,5 0 0,0 0,17A5,5 0 0,0 5,22A5,5 0 0,0 10,17A5,5 0 0,0 5,12M14.8,10H19V8.2H15.8L13.86,4.93C13.57,4.43 13,4.1 12.4,4.1C11.93,4.1 11.5,4.29 11.2,4.6L7.5,8.29C7.19,8.6 7,9 7,9.5C7,10.13 7.33,10.66 7.85,10.97L11.2,13V18H13V11.5L10.75,9.85L13.07,7.5M19,20.5A3.5,3.5 0 0,1 15.5,17A3.5,3.5 0 0,1 19,13.5A3.5,3.5 0 0,1 22.5,17A3.5,3.5 0 0,1 19,20.5M19,12A5,5 0 0,0 14,17A5,5 0 0,0 19,22A5,5 0 0,0 24,17A5,5 0 0,0 19,12M16,4.8C17,4.8 17.8,4 17.8,3C17.8,2 17,1.2 16,1.2C15,1.2 14.2,2 14.2,3C14.2,4 15,4.8 16,4.8Z"}, {PackIconKind.BikeFast,"M16 1.2C15 1.2 14.2 2 14.2 3S15 4.8 16 4.8 17.8 4 17.8 3 17 1.2 16 1.2M12.4 4.1C11.93 4.1 11.5 4.29 11.2 4.6L7.5 8.29C7.19 8.6 7 9 7 9.5C7 10.13 7.33 10.66 7.85 10.97L11.2 13V18H13V11.5L10.75 9.85L13.07 7.5L14.8 10H19V8.2H15.8L13.86 4.93C13.57 4.43 13 4.1 12.4 4.1M10 3H3C2.45 3 2 2.55 2 2S2.45 1 3 1H12.79C12.58 1.34 12.41 1.71 12.32 2.11C11.46 2.13 10.65 2.45 10 3M5 12C2.24 12 0 14.24 0 17S2.24 22 5 22 10 19.76 10 17 7.76 12 5 12M5 20.5C3.07 20.5 1.5 18.93 1.5 17S3.07 13.5 5 13.5 8.5 15.07 8.5 17 6.93 20.5 5 20.5M19 12C16.24 12 14 14.24 14 17S16.24 22 19 22 24 19.76 24 17 21.76 12 19 12M19 20.5C17.07 20.5 15.5 18.93 15.5 17S17.07 13.5 19 13.5 22.5 15.07 22.5 17 20.93 20.5 19 20.5M5.32 11H1C.448 11 0 10.55 0 10S.448 9 1 9H5.05C5.03 9.16 5 9.33 5 9.5C5 10.03 5.12 10.54 5.32 11M6 7H2C1.45 7 1 6.55 1 6S1.45 5 2 5H7.97L6.09 6.87C6.05 6.91 6 6.96 6 7Z"}, + {PackIconKind.BikePedal,"M6.85 5C5.87 5 5.04 5.71 4.87 6.67L4 12L4.87 17.33C5.04 18.29 5.87 19 6.85 19H14.15C15.13 19 15.97 18.29 16.13 17.33L16.68 14H18V13H20V11H18V10H16.68L16.13 6.67C15.97 5.71 15.13 5 14.15 5H6.85M6.85 7H14.15L14.82 11H6.18L6.85 7M6.18 13H14.82L14.15 17H6.85L6.18 13Z"}, + {PackIconKind.BikePedalClipless,"M14.43 16.11L15.28 14H16V13H20V11H16V10H15.28L14.43 7.89C14 6.75 12.87 6 11.65 6H9.35C8.13 6 7 6.75 6.57 7.89L5.37 10.89C5.08 11.6 5.08 12.4 5.37 13.11L6.57 16.11C7 17.25 8.13 18 9.35 18H11.65C12.87 18 14 17.25 14.43 16.11M9.35 8H11.65C12.06 8 12.42 8.25 12.57 8.63L13.12 10H7.88L8.43 8.63C8.58 8.25 8.95 8 9.35 8M8.43 15.37L7.88 14H13.12L12.57 15.37C12.42 15.75 12.05 16 11.65 16H9.35C8.95 16 8.58 15.75 8.43 15.37Z"}, + {PackIconKind.BikePedalMountain,"M6.82 5C5.87 5 5.05 5.67 4.86 6.61L4.04 10.71C4 10.84 4 10.97 4 11.1V12.9C4 13.03 4 13.16 4.04 13.29L4.86 17.39C5.05 18.33 5.87 19 6.82 19H13.38C14.14 19 14.83 18.57 15.17 17.89L16.79 14.66C16.89 14.45 16.96 14.23 17 14H18V13H20V11H18V10H17C16.96 9.77 16.89 9.55 16.79 9.34L15.17 6.11C14.83 5.43 14.14 5 13.38 5H6.82M6.82 7H7.38L9.88 12L7.38 17H6.82L6 12.9V11.1L6.82 7M11.62 11L9.62 7H13.38L15 10.24V11H11.62M11.62 13H15V13.76L13.38 17H9.62L11.62 13Z"}, {PackIconKind.Billboard,"M20 22H18V17H20M6 22H4V17H6M23 4V13A2 2 0 0 1 21 15H3A2 2 0 0 1 1 13V4A2 2 0 0 1 3 2H21A2 2 0 0 1 23 4M21 4H3V13H21M20 6H15V8H20M18 9H15V11H18M14 11H4L6.73 7.36L8.73 10.09L9.46 9.55L8.2 7.82L9.91 5.55Z"}, {PackIconKind.Billiards,"M11,13H13V15H11M11,9H13V11H11M11,17H13A2,2 0 0,0 15,15V13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 15,10.5V9A2,2 0 0,0 13,7H11A2,2 0 0,0 9,9V10.5A1.5,1.5 0 0,0 10.5,12A1.5,1.5 0 0,0 9,13.5V15A2,2 0 0,0 11,17M12,1C5.92,1 1,5.92 1,12C1,18.08 5.92,23 12,23C18.08,23 23,18.08 23,12C23,5.92 18.08,1 12,1M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19Z"}, {PackIconKind.BilliardsRack,"M20.31,16.44L14.54,6.47C13.72,5.04 11.89,4.55 10.46,5.38C10,5.64 9.63,6 9.36,6.47L3.6,16.44C2.77,17.87 3.26,19.69 4.69,20.5C5.14,20.78 5.65,20.92 6.18,20.92H17.73C19.38,20.91 20.72,19.57 20.71,17.92C20.71,17.4 20.57,16.89 20.31,16.44M5.37,17.43L11.11,7.47C11.38,7 12,6.82 12.46,7.1C12.62,7.18 12.75,7.31 12.84,7.47L18.58,17.43C18.85,17.91 18.69,18.5 18.21,18.79C18.06,18.88 17.89,18.93 17.72,18.93H6.21C5.66,18.92 5.21,18.47 5.22,17.92C5.22,17.75 5.26,17.58 5.35,17.43H5.37M11.97,13.45C10.87,13.45 10,12.56 10,11.46C10,10.35 10.87,9.46 11.97,9.46A2,2 0 0,1 13.97,11.46C13.97,12.56 13.07,13.45 11.95,13.45H11.97M9.46,17.93C8.36,17.93 7.47,17.04 7.47,15.94C7.47,14.84 8.36,13.95 9.46,13.95C10.56,13.95 11.46,14.84 11.46,15.94C11.46,17.04 10.56,17.93 9.46,17.93M14.44,17.93A2,2 0 0,1 12.45,15.94A2,2 0 0,1 14.44,13.95C15.54,13.95 16.44,14.84 16.44,15.94C16.44,17.04 15.54,17.93 14.44,17.93Z"}, @@ -3764,6 +3769,10 @@ internal static class PackIconDataFactory {PackIconKind.HomeSearchOutline,"M19.31 18.9C19.75 18.21 20 17.38 20 16.5C20 14 18 12 15.5 12S11 14 11 16.5 13 21 15.5 21C16.37 21 17.19 20.75 17.88 20.32L21 23.39L22.39 22L19.31 18.9M15.5 19C14.12 19 13 17.88 13 16.5S14.12 14 15.5 14 18 15.12 18 16.5 16.88 19 15.5 19M5 20V12H2L12 3L22 12H20.18C19.33 11.11 18.23 10.47 17 10.18L12 5.69L7 10.19V18H9.18C9.35 18.72 9.64 19.39 10.03 20H5Z"}, {PackIconKind.HomeSilo,"M24 7.8C23.6 4.5 20.9 2 17.5 2C15.8 2 14.1 2.7 12.9 3.9C12.2 4.6 11.7 5.3 11.4 6.2L17 9.9V10H20V12H17V14H20V16H17V18H20V20H17V22H24V7.8M13.3 7C13.9 5.2 15.6 4 17.5 4S21.1 5.2 21.7 7H13.3M0 11V22H5V15H10V22H15V11L7.5 6L0 11Z"}, {PackIconKind.HomeSiloOutline,"M20 21H17V19H20V21M20 17H17V15H20V17M20 13H17V11H20V13M24 7.8C23.6 4.5 20.8 2 17.5 2C15.8 2 14.1 2.7 12.9 3.9C12.2 4.6 11.7 5.3 11.4 6.2L15.6 9H22V22H24V7.8M13.3 7C13.9 5.2 15.6 4 17.5 4S21.1 5.2 21.7 7H13.3M7.5 6L0 11V22H15V11L7.5 6M13 20H10V14H5V20H2V12L7.5 8.5L13 12V20Z"}, + {PackIconKind.HomeSoundIn,"M6.58045 2C6.50974 4.6163 4.52984 6.59619 1.98426 6.59619V8.01041C5.44908 8.08112 8.13609 5.39411 7.99467 2H6.58045Z M1.98426 3.62635V5.04056C3.75202 4.96985 5.02482 3.69706 5.02482 2H3.6106C3.46918 2.84853 2.83278 3.48492 1.98426 3.62635Z M22.0157 6.59619C19.4702 6.59619 17.4903 4.6163 17.4196 2H16.0053C15.8639 5.39411 18.5509 8.08112 22.0157 8.01041V6.59619Z M22.0157 5.04056V3.62635C21.1672 3.48492 20.5308 2.84853 20.3894 2H18.9752C18.9752 3.69706 20.248 4.96985 22.0157 5.04056Z M19 20V12H22L12 3L2 12H5V20H19Z"}, + {PackIconKind.HomeSoundInOutline,"M6.58045 2C6.50974 4.6163 4.52984 6.59619 1.98425 6.59619V8.01041C5.44908 8.08112 8.13608 5.39411 7.99466 2H6.58045Z M1.98425 3.62635V5.04056C3.75202 4.96985 5.02481 3.69706 5.02481 2H3.6106C3.46918 2.84853 2.83278 3.48492 1.98425 3.62635Z M22.0157 6.59619C19.4702 6.59619 17.4903 4.6163 17.4195 2H16.0053C15.8639 5.39411 18.5509 8.08112 22.0157 8.01041V6.59619Z M22.0157 5.04056V3.62635C21.1672 3.48492 20.5308 2.84853 20.3894 2H18.9752C18.9752 3.69706 20.248 4.96985 22.0157 5.04056Z M19 20V12H22L12 3L2 12H5V20H19ZM12 5.7L17 10.2V18H7V10.2L12 5.7Z"}, + {PackIconKind.HomeSoundOut,"M2.4038 7.01172C2.47451 4.39542 4.45441 2.41552 7 2.41552V1.00131C3.53517 0.9306 0.848167 3.61761 0.989589 7.01172L2.4038 7.01172Z M7 5.38537V3.97116C5.23223 4.04187 3.95944 5.31466 3.95944 7.01172H5.37365C5.51507 6.16319 6.15147 5.52679 7 5.38537Z M17 2.41552C19.5456 2.41552 21.5255 4.39542 21.5962 7.01172L23.0104 7.01172C23.1518 3.61761 20.4648 0.9306 17 1.00131V2.41552Z M17 3.97116V5.38537C17.8485 5.52679 18.4849 6.16319 18.6263 7.01172H20.0406C20.0406 5.31466 18.7678 4.04187 17 3.97116Z M19 20V12H22L12 3L2 12H5V20H19Z"}, + {PackIconKind.HomeSoundOutOutline,"M2.4038 7.01172C2.47451 4.39542 4.45441 2.41552 7 2.41552V1.00131C3.53517 0.9306 0.848167 3.61761 0.989589 7.01172L2.4038 7.01172Z M7 5.38537V3.97116C5.23223 4.04187 3.95944 5.31466 3.95944 7.01172H5.37365C5.51507 6.16319 6.15147 5.52679 7 5.38537Z M17 2.41552C19.5456 2.41552 21.5255 4.39542 21.5962 7.01172L23.0104 7.01172C23.1518 3.61761 20.4648 0.9306 17 1.00131V2.41552Z M17 3.97116V5.38537C17.8485 5.52679 18.4849 6.16319 18.6263 7.01172H20.0406C20.0406 5.31466 18.7678 4.04187 17 3.97116Z M19 20V12H22L12 3L2 12H5V20H19ZM12 5.7L17 10.2V18H7V10.2L12 5.7Z"}, {PackIconKind.HomeSwitch,"M6.5 15V11H9.5V15H13V9H15L8 3L1 9H3V15H6.5M9 16V18H15V16L18 19L15 22V20H9V22L6 19L9 16M23 9H21V15H15V10H19L13.54 5.11L16 3L23 9Z"}, {PackIconKind.HomeSwitchOutline,"M8 3L1 9H3V15H7V11H9V15H13V9H15L8 3M11.5 9V13.5H10.5V9.5H5.5V13.5H4.5V8L8 5L11.5 8V9M9 16V18H15V16L18 19L15 22V20H9V22L6 19L9 16M23 9H21V15H15V10H19L13.54 5.11L16 3L23 9Z"}, {PackIconKind.HomeThermometer,"M19 8C20.11 8 21 8.9 21 10V16.76C21.61 17.31 22 18.11 22 19C22 20.66 20.66 22 19 22C17.34 22 16 20.66 16 19C16 18.11 16.39 17.31 17 16.76V10C17 8.9 17.9 8 19 8M19 9C18.45 9 18 9.45 18 10V11H20V10C20 9.45 19.55 9 19 9M5 20V12H2L12 3L16.4 6.96C15.54 7.69 15 8.78 15 10V16C14.37 16.83 14 17.87 14 19L14.1 20H5Z"}, diff --git a/MaterialDesignThemes.Wpf/PackIconKind.cs b/MaterialDesignThemes.Wpf/PackIconKind.cs index c28baa9459..568a83eea0 100644 --- a/MaterialDesignThemes.Wpf/PackIconKind.cs +++ b/MaterialDesignThemes.Wpf/PackIconKind.cs @@ -1969,6 +1969,8 @@ public enum PackIconKind BellSleep, NotificationsPaused=BellSleep, BellSleepOutline, + Bench, + BenchBack, Beta, Betamax, Biathlon, @@ -1988,6 +1990,10 @@ public enum PackIconKind DirectionsBike=Bike, BikeFast, Velocity=BikeFast, + BikePedal, + BikePedalFlat=BikePedal, + BikePedalClipless, + BikePedalMountain, Billboard, Billiards, EightBall=Billiards, @@ -7002,6 +7008,10 @@ public enum PackIconKind HomeSiloOutline, FarmHomeOutline=HomeSiloOutline, FarmHouseOutline=HomeSiloOutline, + HomeSoundIn, + HomeSoundInOutline, + HomeSoundOut, + HomeSoundOutOutline, HomeSwitch, HomeSwap=HomeSwitch, HouseSwap=HomeSwitch, From c4e151abc459dc3f5b1ff7b0d981a6f57d7d36e4 Mon Sep 17 00:00:00 2001 From: Hadramet Date: Sun, 22 Jan 2023 20:15:49 +0100 Subject: [PATCH 08/36] Fix for Demo app DataGrid - "Select all" checkbox not working #3032 (#3059) * fix(MaterialDesignDemo):Datagrids select all checkbox binding (#3032) * fix(MaterialDesignDemo3):DataGrids select all checkbox binding (#3032) --- MainDemo.Wpf/DataGrids.xaml | 8 +++----- MainDemo.Wpf/Domain/BindingProxy.cs | 13 ------------- MaterialDesign3.Demo.Wpf/DataGrids.xaml | 8 +++----- MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs | 13 ------------- 4 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 MainDemo.Wpf/Domain/BindingProxy.cs delete mode 100644 MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs diff --git a/MainDemo.Wpf/DataGrids.xaml b/MainDemo.Wpf/DataGrids.xaml index d33b50ed9b..1f4a9aa80e 100644 --- a/MainDemo.Wpf/DataGrids.xaml +++ b/MainDemo.Wpf/DataGrids.xaml @@ -32,22 +32,20 @@ SelectedIndex="0" /> + + - - - - - + diff --git a/MainDemo.Wpf/Domain/BindingProxy.cs b/MainDemo.Wpf/Domain/BindingProxy.cs deleted file mode 100644 index 9bd6e4a7bb..0000000000 --- a/MainDemo.Wpf/Domain/BindingProxy.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace MaterialDesignDemo.Domain; - -public class BindingProxy : DependencyObject -{ - public object? Data - { - get => GetValue(DataProperty); - set => SetValue(DataProperty, value); - } - - public static readonly DependencyProperty DataProperty = - DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null)); -} diff --git a/MaterialDesign3.Demo.Wpf/DataGrids.xaml b/MaterialDesign3.Demo.Wpf/DataGrids.xaml index c462810525..2ec3c89010 100644 --- a/MaterialDesign3.Demo.Wpf/DataGrids.xaml +++ b/MaterialDesign3.Demo.Wpf/DataGrids.xaml @@ -22,22 +22,20 @@ + + - - - - - + diff --git a/MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs b/MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs deleted file mode 100644 index a35ab12688..0000000000 --- a/MaterialDesign3.Demo.Wpf/Domain/BindingProxy.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace MaterialDesign3Demo.Domain; - -public class BindingProxy : DependencyObject -{ - public object? Data - { - get => GetValue(DataProperty); - set => SetValue(DataProperty, value); - } - - public static readonly DependencyProperty DataProperty = - DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null)); -} From fcc92c5d6c3e10ae5202174829ca3f86d043c469 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 01:09:49 +0000 Subject: [PATCH 09/36] Bump Microsoft.CodeAnalysis.Analyzers from 3.3.3 to 3.3.4 (#3061) Bumps [Microsoft.CodeAnalysis.Analyzers](https://github.com/dotnet/roslyn-analyzers) from 3.3.3 to 3.3.4. - [Release notes](https://github.com/dotnet/roslyn-analyzers/releases) - [Changelog](https://github.com/dotnet/roslyn-analyzers/blob/main/PostReleaseActivities.md) - [Commits](https://github.com/dotnet/roslyn-analyzers/compare/v3.3.3...v3.3.4) --- updated-dependencies: - dependency-name: Microsoft.CodeAnalysis.Analyzers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.packages.props b/Directory.packages.props index b6eeb4f3d8..e91ba4e2a2 100644 --- a/Directory.packages.props +++ b/Directory.packages.props @@ -5,7 +5,7 @@ - + From 9d97b025dd60c0681a75c0ac8e085271259a3533 Mon Sep 17 00:00:00 2001 From: Kevin B Date: Sun, 22 Jan 2023 21:13:36 -0800 Subject: [PATCH 10/36] Fixing icon update (#3062) --- mdresgen/IconThing.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mdresgen/IconThing.cs b/mdresgen/IconThing.cs index 8ea81b8a50..30a9789264 100644 --- a/mdresgen/IconThing.cs +++ b/mdresgen/IconThing.cs @@ -50,8 +50,10 @@ private static void Write(string content, string filePath) private static async Task GetSourceDataAsync() { + //Might want to consider leveraging one of the other json sources. + //https://github.com/Pictogrammers/pictogrammers.com/blob/18993aab2e9f0f647aa5b54faf995ae1718bc505/docs/contribute/api.mdx return await Client.GetStringAsync( - "https://materialdesignicons.com/api/package/38EF63D0-4744-11E4-B3CF-842B2B6CFE1B"); + "https://dev.materialdesignicons.com/api/package/38EF63D0-4744-11E4-B3CF-842B2B6CFE1B"); } private static IEnumerable GetIcons(string sourceData) @@ -62,7 +64,9 @@ private static IEnumerable GetIcons(string sourceData) jObject["icons"]?.Select(t => new Icon( t["name"]?.ToString().Underscore().Pascalize() ?? throw new Exception("Failed to find name"), t["data"]?.ToString() ?? throw new Exception("Failed to find data"), - t["aliases"]?.ToObject>()?.Select(x => x.Underscore().Pascalize()).ToList() + t["aliases"]?.ToObject>()? + .Select(x => x["name"]?.ToString().Underscore().Pascalize()) + .OfType().ToList() ?? throw new Exception("Failed to find aliases"))) ?? throw new Exception("failed to find icons") ); From a0bacbf352c6d7994886b4226db0db4b1a5adbff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 05:13:47 +0000 Subject: [PATCH 11/36] Bump CommunityToolkit.Mvvm from 8.0.0 to 8.1.0 (#3060) * Bump CommunityToolkit.Mvvm from 8.0.0 to 8.1.0 Bumps [CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet) from 8.0.0 to 8.1.0. - [Release notes](https://github.com/CommunityToolkit/dotnet/releases) - [Commits](https://github.com/CommunityToolkit/dotnet/compare/v8.0.0...v8.1.0) --- updated-dependencies: - dependency-name: CommunityToolkit.Mvvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fixing build warning Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Bost --- Directory.packages.props | 2 +- .../Samples/DialogHost/ClosingEventViewModel.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Directory.packages.props b/Directory.packages.props index e91ba4e2a2..e770090448 100644 --- a/Directory.packages.props +++ b/Directory.packages.props @@ -1,7 +1,7 @@ - + diff --git a/MaterialDesignThemes.UITests/Samples/DialogHost/ClosingEventViewModel.cs b/MaterialDesignThemes.UITests/Samples/DialogHost/ClosingEventViewModel.cs index df98d037b4..ea01bfee10 100644 --- a/MaterialDesignThemes.UITests/Samples/DialogHost/ClosingEventViewModel.cs +++ b/MaterialDesignThemes.UITests/Samples/DialogHost/ClosingEventViewModel.cs @@ -3,8 +3,7 @@ namespace MaterialDesignThemes.UITests.Samples.DialogHost; -[ObservableObject] -public partial class ClosingEventViewModel +public partial class ClosingEventViewModel : ObservableObject { [ObservableProperty] private bool _dialogIsOpen; From 607ee6a0c917d0bdb5f26c5575d119fd6c6498e0 Mon Sep 17 00:00:00 2001 From: Nicolai Henriksen Date: Mon, 30 Jan 2023 09:44:05 +0100 Subject: [PATCH 12/36] Refactor SmartHint alignment (#3056) * Refactor SmartHint alignment Alignment now respects the HorizontalContentAlignment of the "owner"/"proxy". By default, the hint will float to the same alignment (left/center/right) as the HorizontalContentAlignment. Because I suspect there may be cases a user would want to float the hint differently that the resting position, I added an attached property HintAssist.FloatingHintHorizontalAlignment (inherited in the visual tree) which can be used to override the hint position when the hint is floated. By default, this property returns "Inherit" which means it follows the HorizontalContentAlignment, but it can also be set to Left/Center/Right/Stretch allowing explicit override of the default floating position. * Update MaterialDesignThemes.Wpf/Converters/FloatingHintTextBlockMarginConverter.cs Co-authored-by: Kevin B --------- Co-authored-by: Kevin B --- MainDemo.Wpf/Domain/MainWindowViewModel.cs | 9 + MainDemo.Wpf/Domain/SmartHintViewModel.cs | 80 +++ MainDemo.Wpf/SmartHint.xaml | 491 ++++++++++++++++++ MainDemo.Wpf/SmartHint.xaml.cs | 15 + .../FloatingHintTextBlockMarginConverter.cs | 116 +++++ .../FloatingHintHorizontalAlignment.cs | 10 + MaterialDesignThemes.Wpf/HintAssist.cs | 11 + .../Themes/MaterialDesignTheme.ComboBox.xaml | 7 +- .../MaterialDesignTheme.PasswordBox.xaml | 22 +- .../Themes/MaterialDesignTheme.SmartHint.xaml | 12 + .../Themes/MaterialDesignTheme.TextBox.xaml | 10 +- 11 files changed, 770 insertions(+), 13 deletions(-) create mode 100644 MainDemo.Wpf/Domain/SmartHintViewModel.cs create mode 100644 MainDemo.Wpf/SmartHint.xaml create mode 100644 MainDemo.Wpf/SmartHint.xaml.cs create mode 100644 MaterialDesignThemes.Wpf/Converters/FloatingHintTextBlockMarginConverter.cs create mode 100644 MaterialDesignThemes.Wpf/FloatingHintHorizontalAlignment.cs diff --git a/MainDemo.Wpf/Domain/MainWindowViewModel.cs b/MainDemo.Wpf/Domain/MainWindowViewModel.cs index f56ea9e4bd..2da13acc3b 100644 --- a/MainDemo.Wpf/Domain/MainWindowViewModel.cs +++ b/MainDemo.Wpf/Domain/MainWindowViewModel.cs @@ -419,6 +419,15 @@ private static IEnumerable GenerateDemoItems(ISnackbarMessageQueue sna DocumentationLink.StyleLink("Shadows"), DocumentationLink.SpecsLink("https://material.io/design/environment/elevation.html", "Elevation") }); + + yield return new DemoItem( + "Smart Hint", + typeof(SmartHint), + new[] + { + DocumentationLink.DemoPageLink(), + DocumentationLink.StyleLink("SmartHint"), + }); } private bool DemoItemsFilter(object obj) diff --git a/MainDemo.Wpf/Domain/SmartHintViewModel.cs b/MainDemo.Wpf/Domain/SmartHintViewModel.cs new file mode 100644 index 0000000000..3dd9470826 --- /dev/null +++ b/MainDemo.Wpf/Domain/SmartHintViewModel.cs @@ -0,0 +1,80 @@ +using MaterialDesignThemes.Wpf; + +namespace MaterialDesignDemo.Domain; + +internal class SmartHintViewModel : ViewModelBase +{ + private FloatingHintHorizontalAlignment _selectedAlignment = FloatingHintHorizontalAlignment.Inherit; + private double _selectedFloatingScale = 0.75; + private bool _showClearButton = true; + private bool _showLeadingIcon = true; + private string _hintText = "Hint text"; + private Point _selectedFloatingOffset = new (0, -16); + + public IEnumerable HorizontalAlignmentOptions { get; } = Enum.GetValues(typeof(FloatingHintHorizontalAlignment)).OfType(); + public IEnumerable FloatingScaleOptions { get; } = new[] {0.25, 0.5, 0.75, 1.0}; + + public IEnumerable FloatingOffsetOptions { get; } = new[] { new Point(0, -16), new Point(0, 16), new Point(16, 16), new Point(-16, -16) }; + + public IEnumerable ComboBoxOptions { get; } = new[] {"Option 1", "Option 2", "Option 3"}; + + public FloatingHintHorizontalAlignment SelectedAlignment + { + get => _selectedAlignment; + set + { + _selectedAlignment = value; + OnPropertyChanged(); + } + } + + public double SelectedFloatingScale + { + get => _selectedFloatingScale; + set + { + _selectedFloatingScale = value; + OnPropertyChanged(); + } + } + + public Point SelectedFloatingOffset + { + get => _selectedFloatingOffset; + set + { + _selectedFloatingOffset = value; + OnPropertyChanged(); + } + } + + public bool ShowClearButton + { + get => _showClearButton; + set + { + _showClearButton = value; + OnPropertyChanged(); + } + } + + public bool ShowLeadingIcon + { + get => _showLeadingIcon; + set + { + _showLeadingIcon = value; + OnPropertyChanged(); + } + } + + public string HintText + { + get => _hintText; + set + { + _hintText = value; + OnPropertyChanged(); + } + } +} diff --git a/MainDemo.Wpf/SmartHint.xaml b/MainDemo.Wpf/SmartHint.xaml new file mode 100644 index 0000000000..2441801fd3 --- /dev/null +++ b/MainDemo.Wpf/SmartHint.xaml @@ -0,0 +1,491 @@ + + + + + + + Github + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFloatingHintTextBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFilledTextBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignOutlinedTextBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignRichTextBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFloatingHintPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFilledPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignOutlinedPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFloatingHintRevealPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFilledRevealPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignOutlinedRevealPasswordBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFloatingHintComboBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignFilledComboBox + + + + + + + + + + + + + + + + + + + + + + + + + + MaterialDesignOutlinedComboBox + + + + + + + + + + + + + + + + + diff --git a/MainDemo.Wpf/SmartHint.xaml.cs b/MainDemo.Wpf/SmartHint.xaml.cs new file mode 100644 index 0000000000..6fba47dd90 --- /dev/null +++ b/MainDemo.Wpf/SmartHint.xaml.cs @@ -0,0 +1,15 @@ +using MaterialDesignDemo.Domain; + +namespace MaterialDesignDemo; + +/// +/// Interaction logic for SmartHint.xaml +/// +public partial class SmartHint : UserControl +{ + public SmartHint() + { + DataContext = new SmartHintViewModel(); + InitializeComponent(); + } +} diff --git a/MaterialDesignThemes.Wpf/Converters/FloatingHintTextBlockMarginConverter.cs b/MaterialDesignThemes.Wpf/Converters/FloatingHintTextBlockMarginConverter.cs new file mode 100644 index 0000000000..0510d235bb --- /dev/null +++ b/MaterialDesignThemes.Wpf/Converters/FloatingHintTextBlockMarginConverter.cs @@ -0,0 +1,116 @@ +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; + +namespace MaterialDesignThemes.Wpf.Converters; + +internal class FloatingHintTextBlockMarginConverter : IMultiValueConverter +{ + public object? Convert(object?[]? values, Type targetType, object? parameter, CultureInfo culture) + { + if (values?.Length != 7 || values.Any(v => v == null) + || values[0] is not FloatingHintHorizontalAlignment floatingAlignment + || values[1] is not HorizontalAlignment restingAlignment + || !double.TryParse(values[2]!.ToString(), out double desiredWidth) + || !double.TryParse(values[3]!.ToString(), out double availableWidth) + || !double.TryParse(values[4]!.ToString(), out double scale) + || !double.TryParse(values[5]!.ToString(), out double lower) + || !double.TryParse(values[6]!.ToString(), out double upper)) + { + return Transform.Identity; + } + + double scaleMultiplier = upper + (lower - upper) * scale; + + HorizontalAlignment alignment = restingAlignment; + if (scale != 0) + { + switch (floatingAlignment) + { + case FloatingHintHorizontalAlignment.Inherit: + alignment = restingAlignment; + break; + case FloatingHintHorizontalAlignment.Left: + alignment = HorizontalAlignment.Left; + break; + case FloatingHintHorizontalAlignment.Center: + alignment = HorizontalAlignment.Center; + break; + case FloatingHintHorizontalAlignment.Right: + alignment = HorizontalAlignment.Right; + break; + case FloatingHintHorizontalAlignment.Stretch: + alignment = HorizontalAlignment.Stretch; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + switch (alignment) + { + case HorizontalAlignment.Right: + return FloatRight(); + case HorizontalAlignment.Center: + return FloatCenter(); + default: + return FloatLeft(); + } + + Thickness FloatLeft() + { + if (restingAlignment == HorizontalAlignment.Center) + { + // Animate from center to left + double offset = Math.Max(0, (availableWidth - desiredWidth) / 2); + return new Thickness(offset - offset * scale, 0, 0, 0); + } + if (restingAlignment == HorizontalAlignment.Right) + { + // Animate from right to left + double offset = Math.Max(0, availableWidth - desiredWidth); + return new Thickness(offset - offset * scale, 0, 0, 0); + } + return new Thickness(0); + } + + Thickness FloatCenter() + { + if (restingAlignment == HorizontalAlignment.Left || restingAlignment == HorizontalAlignment.Stretch) + { + // Animate from left to center + double offset = Math.Max(0, (availableWidth - desiredWidth * scaleMultiplier) / 2); + return new Thickness(offset * scale, 0, 0, 0); + } + if (restingAlignment == HorizontalAlignment.Right) + { + // Animate from right to center + double startOffset = Math.Max(0, availableWidth - desiredWidth); + double endOffset = Math.Max(0, (availableWidth - desiredWidth) / 2); + double endOffsetDelta = startOffset - endOffset; + return new Thickness(endOffset + endOffsetDelta * (1 - scale), 0, 0, 0); + } + return new Thickness(Math.Max(0, availableWidth - desiredWidth * scaleMultiplier) / 2, 0, 0, 0); + } + + Thickness FloatRight() + { + if (restingAlignment == HorizontalAlignment.Left || restingAlignment == HorizontalAlignment.Stretch) + { + // Animate from left to right + double offset = Math.Max(0, availableWidth - desiredWidth * scaleMultiplier); + return new Thickness(offset * scale, 0, 0, 0); + } + if (restingAlignment == HorizontalAlignment.Center) + { + // Animate from center to right + double startOffset = Math.Max(0, (availableWidth - desiredWidth) / 2); + double endOffsetDelta = Math.Max(0, availableWidth - desiredWidth * scaleMultiplier) - startOffset; + return new Thickness(startOffset + endOffsetDelta * scale, 0, 0, 0); + } + return new Thickness(Math.Max(0, availableWidth - desiredWidth * scaleMultiplier), 0, 0, 0); + } + } + + public object?[]? ConvertBack(object? value, Type[] targetTypes, object? parameter, CultureInfo culture) + => throw new NotImplementedException(); +} diff --git a/MaterialDesignThemes.Wpf/FloatingHintHorizontalAlignment.cs b/MaterialDesignThemes.Wpf/FloatingHintHorizontalAlignment.cs new file mode 100644 index 0000000000..bd67e19c0c --- /dev/null +++ b/MaterialDesignThemes.Wpf/FloatingHintHorizontalAlignment.cs @@ -0,0 +1,10 @@ +namespace MaterialDesignThemes.Wpf; + +public enum FloatingHintHorizontalAlignment +{ + Inherit, + Left, + Center, + Right, + Stretch +} diff --git a/MaterialDesignThemes.Wpf/HintAssist.cs b/MaterialDesignThemes.Wpf/HintAssist.cs index 8941caa287..29802224de 100644 --- a/MaterialDesignThemes.Wpf/HintAssist.cs +++ b/MaterialDesignThemes.Wpf/HintAssist.cs @@ -66,6 +66,17 @@ public static void SetHintOpacity(DependencyObject element, double value) => element.SetValue(HintOpacityProperty, value); #endregion + #region AttachedProperty : FloatingHintHorizontalAlignment + public static readonly DependencyProperty FloatingHintHorizontalAlignmentProperty + = DependencyProperty.RegisterAttached("FloatingHintHorizontalAlignment", typeof(FloatingHintHorizontalAlignment), typeof(HintAssist), + new FrameworkPropertyMetadata(FloatingHintHorizontalAlignment.Inherit, FrameworkPropertyMetadataOptions.Inherits)); + + public static void SetFloatingHintHorizontalAlignment(DependencyObject element, FloatingHintHorizontalAlignment value) + => element.SetValue(FloatingHintHorizontalAlignmentProperty, value); + public static FloatingHintHorizontalAlignment GetFloatingHintHorizontalAlignment(DependencyObject element) + => (FloatingHintHorizontalAlignment) element.GetValue(FloatingHintHorizontalAlignmentProperty); + #endregion + #region AttachedProperty : HintFontFamilyProperty public static readonly DependencyProperty FontFamilyProperty = DependencyProperty.RegisterAttached("FontFamily", typeof(FontFamily), typeof(HintAssist), diff --git a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml index de83e984d2..8a2b069c8e 100644 --- a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml +++ b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml @@ -326,7 +326,7 @@ Grid.Column="0" Padding="{TemplateBinding Padding}"> @@ -353,7 +353,7 @@ + UseLayoutRounding="{TemplateBinding UseLayoutRounding}" + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"> - + + VerticalAlignment="Center" + HorizontalAlignment="Stretch"> @@ -155,6 +156,7 @@ wpf:ScrollViewerAssist.IgnorePadding="True" Cursor="{TemplateBinding Cursor, Converter={StaticResource IBeamCursorConverter}}" Focusable="false" + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalScrollBarVisibility="Hidden" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" UseLayoutRounding="{TemplateBinding UseLayoutRounding}" @@ -168,7 +170,8 @@ FontSize="{TemplateBinding FontSize}" HintOpacity="{TemplateBinding wpf:HintAssist.HintOpacity}" HintProxy="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static converters:HintProxyFabricConverter.Instance}}" - UseFloating="{TemplateBinding wpf:HintAssist.IsFloating}"> + UseFloating="{TemplateBinding wpf:HintAssist.IsFloating}" + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"> - + - + + VerticalAlignment="Center" + HorizontalAlignment="Stretch"> @@ -618,6 +622,7 @@ @@ -657,7 +664,8 @@ FontSize="{TemplateBinding FontSize}" HintOpacity="{TemplateBinding wpf:HintAssist.HintOpacity}" HintProxy="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static converters:HintProxyFabricConverter.Instance}}" - UseFloating="{TemplateBinding wpf:HintAssist.IsFloating}"> + UseFloating="{TemplateBinding wpf:HintAssist.IsFloating}" + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"> + 1.0 @@ -159,6 +160,17 @@ Opacity="{TemplateBinding HintOpacity}" RenderTransformOrigin="0,0" Visibility="{TemplateBinding UseFloating, Converter={StaticResource BoolToVisConverter}}"> + + + + + + + + + + + 0.0 diff --git a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml index efc4d6bcda..669ad54900 100644 --- a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml +++ b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml @@ -127,7 +127,7 @@ BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" SnapsToDevicePixels="True"> - + @@ -145,7 +145,9 @@ + MinWidth="1" + VerticalAlignment="Center" + HorizontalAlignment="Stretch"> @@ -170,6 +172,7 @@ + UseFloating="{TemplateBinding wpf:HintAssist.IsFloating}" + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"> Date: Fri, 3 Feb 2023 23:36:08 -0800 Subject: [PATCH 13/36] [bot] Pack Icon update (#3071) Co-authored-by: github-actions[bot] --- MaterialDesignThemes.Wpf/PackIconDataFactory.cs | 8 ++++++++ MaterialDesignThemes.Wpf/PackIconKind.cs | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs index b603509a56..9634b419c7 100644 --- a/MaterialDesignThemes.Wpf/PackIconDataFactory.cs +++ b/MaterialDesignThemes.Wpf/PackIconDataFactory.cs @@ -767,6 +767,7 @@ internal static class PackIconDataFactory {PackIconKind.BaseballBat,"M20,2C19.72,2 19.5,2.11 19.29,2.29L9.79,11.79C9.75,11.83 9.72,11.87 7.23,15.35L4,18.59L3.71,18.29C3.5,18.1 3.26,18 3,18C2.44,18 2,18.44 2,19C2,19.26 2.1,19.5 2.29,19.71L4.29,21.71C4.68,22.11 5.31,22.12 5.71,21.74C6.11,21.35 6.12,20.72 5.71,20.29L5.41,20L8.64,16.77L12.21,14.21L21.71,4.71C22.1,4.32 22.1,3.68 21.71,3.29L20.71,2.29C20.5,2.1 20.26,2 20,2M18.5,13A2.5,2.5 0 0,0 16,15.5A2.5,2.5 0 0,0 18.5,18A2.5,2.5 0 0,0 21,15.5A2.5,2.5 0 0,0 18.5,13Z"}, {PackIconKind.BaseballDiamond,"M5.79 12.79L2 9C2 9 6 3 12 3S22 9 22 9L18.21 12.79L12 6.59L5.79 12.79M13.5 18H10.5V20L12 21L13.5 20V18M16.79 14.21L14.2 16.8C13.6 16.31 12.84 16 12 16S10.4 16.31 9.8 16.8L7.21 14.21L12 9.41L16.79 14.21M13 14C13 13.45 12.55 13 12 13S11 13.45 11 14 11.45 15 12 15 13 14.55 13 14Z"}, {PackIconKind.BaseballDiamondOutline,"M12 2C5 2 1 9 1 9L9.3 17.3C9.74 16.77 10.32 16.37 11 16.17L7.83 13L12 8.83L16.17 13L13 16.17C13.68 16.37 14.27 16.77 14.7 17.3L23 9C23 9 19 2 12 2M17.59 11.59L12 6L6.41 11.59L3.59 8.76C4.95 7 7.89 4 12 4C16.08 4 19.03 7 20.4 8.77L17.59 11.59M13 13C13 13.55 12.55 14 12 14S11 13.55 11 13 11.45 12 12 12 13 12.45 13 13M13.5 20L12 21L10.5 20V18H13.5V20Z"}, + {PackIconKind.BaseballOutline,"M8.17 2.76C9.39 2.26 10.69 2 12 2C13.31 2 14.61 2.26 15.83 2.76C17.04 3.26 18.14 4 19.07 4.93C20 5.86 20.74 6.96 21.24 8.17C21.74 9.39 22 10.69 22 12C22 14.65 20.95 17.2 19.07 19.07C17.2 20.95 14.65 22 12 22C10.69 22 9.39 21.74 8.17 21.24C6.96 20.74 5.86 20 4.93 19.07C3.05 17.2 2 14.65 2 12C2 9.35 3.05 6.8 4.93 4.93C5.86 4 6.96 3.26 8.17 2.76M7.89 18.86C9.12 19.6 10.54 20 12 20C13.46 20 14.88 19.6 16.11 18.86L15.11 17.13L16.11 16.55C15.55 15.47 15.18 14.27 15.05 13H14V11H15.05C15.18 9.73 15.55 8.53 16.11 7.45L15.11 6.87L16.11 5.14C14.88 4.4 13.46 4 12 4C10.54 4 9.12 4.4 7.89 5.14L8.89 6.87L7.89 7.44C8.45 8.53 8.82 9.73 8.95 11H10V13H8.95C8.82 14.27 8.45 15.47 7.89 16.56L8.89 17.13L7.89 18.86M5 15.88L5.43 15.13L6.16 15.56C6.55 14.77 6.82 13.91 6.93 13H6V11H6.93C6.82 10.09 6.55 9.23 6.16 8.44L5.43 8.87L5 8.12C4.35 9.3 4 10.63 4 12C4 13.37 4.35 14.7 5 15.88M19 8.13L18.57 8.87L17.84 8.44C17.45 9.23 17.18 10.09 17.07 11H18V13H17.07C17.18 13.91 17.45 14.77 17.84 15.56L18.57 15.13L19 15.88C19.65 14.7 20 13.37 20 12C20 10.63 19.65 9.3 19 8.12Z"}, {PackIconKind.Bash,"M5 9H7.31L7.63 6H9.63L9.31 9H11.31L11.63 6H13.63L13.31 9H15V11H13.1L12.9 13H15V15H12.69L12.37 18H10.37L10.69 15H8.69L8.37 18H6.37L6.69 15H5V13H6.9L7.1 11H5V9M9.1 11L8.9 13H10.9L11.1 11M19 6H17V14H19M19 16H17V18H19Z"}, {PackIconKind.Basket,"M5.5,21C4.72,21 4.04,20.55 3.71,19.9V19.9L1.1,10.44L1,10A1,1 0 0,1 2,9H6.58L11.18,2.43C11.36,2.17 11.66,2 12,2C12.34,2 12.65,2.17 12.83,2.44L17.42,9H22A1,1 0 0,1 23,10L22.96,10.29L20.29,19.9C19.96,20.55 19.28,21 18.5,21H5.5M12,4.74L9,9H15L12,4.74M12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13Z"}, {PackIconKind.Basketball,"M2.34,14.63C2.94,14.41 3.56,14.3 4.22,14.3C5.56,14.3 6.73,14.72 7.73,15.56L4.59,18.7C3.53,17.5 2.78,16.13 2.34,14.63M15.56,9.8C17.53,11.27 19.66,11.63 21.94,10.88C21.97,11.09 22,11.47 22,12C22,13.03 21.75,14.18 21.28,15.45C20.81,16.71 20.23,17.73 19.55,18.5L13.22,12.19L15.56,9.8M8.77,16.64C9.83,18.17 10.05,19.84 9.42,21.66C8,21.25 6.73,20.61 5.67,19.73L8.77,16.64M12.19,13.22L18.5,19.55C16.33,21.45 13.78,22.25 10.88,21.94C11.09,21.28 11.2,20.56 11.2,19.78C11.2,19.16 11.06,18.43 10.78,17.6C10.5,16.77 10.17,16.09 9.8,15.56L12.19,13.22M8.81,14.5C7.88,13.67 6.8,13.15 5.58,12.91C4.36,12.68 3.19,12.75 2.06,13.13C2.03,12.91 2,12.53 2,12C2,10.97 2.25,9.82 2.72,8.55C3.19,7.29 3.77,6.27 4.45,5.5L11.11,12.19L8.81,14.5M15.56,7.73C14.22,6.08 13.91,4.28 14.63,2.34C15.25,2.5 15.96,2.8 16.76,3.26C17.55,3.71 18.2,4.16 18.7,4.59L15.56,7.73M21.66,9.38C21.06,9.59 20.44,9.7 19.78,9.7C18.69,9.7 17.64,9.38 16.64,8.72L19.73,5.67C20.61,6.77 21.25,8 21.66,9.38M12.19,11.11L5.5,4.45C7.67,2.55 10.22,1.75 13.13,2.06C12.91,2.72 12.8,3.44 12.8,4.22C12.8,4.94 12.96,5.75 13.29,6.66C13.62,7.56 14,8.28 14.5,8.81L12.19,11.11Z"}, @@ -2579,6 +2580,7 @@ internal static class PackIconDataFactory {PackIconKind.EmailEditOutline,"M19.07 13.88L13 19.94V22H15.06L21.12 15.93M22.7 13.58L21.42 12.3C21.32 12.19 21.18 12.13 21.04 12.13C20.89 12.14 20.75 12.19 20.65 12.3L19.65 13.3L21.7 15.3L22.7 14.3C22.89 14.1 22.89 13.78 22.7 13.58M11 18H4V8L12 13L20 8V10H22V6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H11V18M20 6L12 11L4 6H20Z"}, {PackIconKind.EmailFast,"M22 5.5H9C7.9 5.5 7 6.4 7 7.5V16.5C7 17.61 7.9 18.5 9 18.5H22C23.11 18.5 24 17.61 24 16.5V7.5C24 6.4 23.11 5.5 22 5.5M22 9.17L15.5 12.5L9 9.17V7.5L15.5 10.81L22 7.5V9.17M5 16.5C5 16.67 5.03 16.83 5.05 17H1C.448 17 0 16.55 0 16S.448 15 1 15H5V16.5M3 7H5.05C5.03 7.17 5 7.33 5 7.5V9H3C2.45 9 2 8.55 2 8S2.45 7 3 7M1 12C1 11.45 1.45 11 2 11H5V13H2C1.45 13 1 12.55 1 12Z"}, {PackIconKind.EmailFastOutline,"M22 5.5H9C7.9 5.5 7 6.4 7 7.5V16.5C7 17.61 7.9 18.5 9 18.5H22C23.11 18.5 24 17.61 24 16.5V7.5C24 6.4 23.11 5.5 22 5.5M22 16.5H9V9.17L15.5 12.5L22 9.17V16.5M15.5 10.81L9 7.5H22L15.5 10.81M5 16.5C5 16.67 5.03 16.83 5.05 17H1C.448 17 0 16.55 0 16S.448 15 1 15H5V16.5M3 7H5.05C5.03 7.17 5 7.33 5 7.5V9H3C2.45 9 2 8.55 2 8S2.45 7 3 7M1 12C1 11.45 1.45 11 2 11H5V13H2C1.45 13 1 12.55 1 12Z"}, + {PackIconKind.EmailHeartOutline,"M10 9C8.9 9 8 9.92 8 11.05C8 11.62 8.22 12.12 8.59 12.5L12 16L15.42 12.5C15.78 12.13 16 11.61 16 11.05C16 9.92 15.1 9 14 9C13.46 9 12.95 9.23 12.59 9.6L12 10.2L11.42 9.61C11.05 9.23 10.54 9 10 9M20 4C21.1 4 22 4.9 22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6C2 4.9 2.9 4 4 4H20M16.7 8.06L20 6H4L7.3 8.06C6.89 8.45 6.55 8.92 6.33 9.45L4 8V18H20V8L17.67 9.45C17.45 8.92 17.11 8.45 16.7 8.06Z"}, {PackIconKind.EmailLock,"M12 18.2C12 17.24 12.5 16.34 13.2 15.74V15.5C13.2 13.06 15.4 11 18 11C19.65 11 21.13 11.83 22 13.06V6C22 4.89 21.1 4 20 4H4C2.89 4 2 4.89 2 6V18C2 19.11 2.9 20 4 20H12V18.2M4 6L12 11L20 6V8L12 13L4 8V6M20.8 17V15.5C20.8 14.1 19.4 13 18 13S15.2 14.1 15.2 15.5V17C14.6 17 14 17.6 14 18.2V21.7C14 22.4 14.6 23 15.2 23H20.7C21.4 23 22 22.4 22 21.8V18.3C22 17.6 21.4 17 20.8 17M19.5 17H16.5V15.5C16.5 14.7 17.2 14.2 18 14.2S19.5 14.7 19.5 15.5V17Z"}, {PackIconKind.EmailLockOutline,"M12 18.2C12 18.13 12 18.07 12 18H4V8L12 13L20 8V11.44C20.81 11.8 21.5 12.36 22 13.06V6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H12V18.2M20 6L12 11L4 6H20M20.8 17V15.5C20.8 14.1 19.4 13 18 13S15.2 14.1 15.2 15.5V17C14.6 17 14 17.6 14 18.2V21.7C14 22.4 14.6 23 15.2 23H20.7C21.4 23 22 22.4 22 21.8V18.3C22 17.6 21.4 17 20.8 17M19.5 17H16.5V15.5C16.5 14.7 17.2 14.2 18 14.2S19.5 14.7 19.5 15.5V17Z"}, {PackIconKind.EmailMarkAsUnread,"M18.84,7H16.22L10.5,4L4,7.41V17A2,2 0 0,1 2,15V7.17C2,6.5 2.28,6.06 2.81,5.81L10.5,2L18.05,5.81C18.5,6.09 18.78,6.5 18.84,7M7,8H20A2,2 0 0,1 22,10V19A2,2 0 0,1 20,21H7A2,2 0 0,1 5,19V10A2,2 0 0,1 7,8M20,11.67V10L13.5,13.31L7,10V11.67L13.5,15L20,11.67Z"}, @@ -2590,6 +2592,7 @@ internal static class PackIconDataFactory {PackIconKind.EmailOff,"M22.1 21.5L2.4 1.7L1.1 3L2.6 4.5C2.2 4.9 2 5.4 2 6V18C2 19.1 2.9 20 4 20H18.1L20.8 22.7L22.1 21.5M4 8V6L4.3 6.2L9.6 11.5L4 8M13.4 10.2L7.2 4H20C21.1 4 22 4.9 22 6V18C22 18.2 22 18.5 21.9 18.7L14.6 11.4L20 8V6L13.4 10.2Z"}, {PackIconKind.EmailOffOutline,"M22.1 21.5L2.4 1.7L1.1 3L2.6 4.5C2.3 4.9 2 5.4 2 6V18C2 19.1 2.9 20 4 20H18.1L20.8 22.7L22.1 21.5M4 18V8L9.6 11.5L16.1 18H4M9.2 6L7.2 4H20C21.1 4 22 4.9 22 6V18C22 18.2 22 18.5 21.9 18.7L20 16.8V8L14.6 11.4L13.4 10.2L20 6H9.2Z"}, {PackIconKind.EmailOpen,"M4,8L12,13L20,8V8L12,3L4,8V8M22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V8C2,7.27 2.39,6.64 2.97,6.29L12,0.64L21.03,6.29C21.61,6.64 22,7.27 22,8Z"}, + {PackIconKind.EmailOpenHeartOutline,"M10 9C8.9 9 8 9.92 8 11.05C8 11.62 8.22 12.12 8.59 12.5L12 16L15.42 12.5C15.78 12.13 16 11.61 16 11.05C16 9.92 15.1 9 14 9C13.46 9 12.95 9.23 12.59 9.6L12 10.2L11.42 9.61C11.05 9.23 10.54 9 10 9M12 .64L21.03 6.29C21.61 6.64 22 7.27 22 8V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V8C2 7.27 2.39 6.64 2.97 6.29L12 .64M4 10V18H20V10L18 11.25C18 11.19 18 11.12 18 11.05C18 10.5 17.88 9.95 17.67 9.45L20 8L12 3L4 8L6.33 9.45C6.12 9.95 6 10.5 6 11.05C6 11.12 6 11.19 6 11.25L4 10Z"}, {PackIconKind.EmailOpenMultiple,"M6,8L14,13L22,8V8L14,3L6,8V8M24,8V18A2,2 0 0,1 22,20H6A2,2 0 0,1 4,18V8C4,7.27 4.39,6.64 4.97,6.29L14,0.64L23.03,6.29C23.61,6.64 24,7.27 24,8M2,8V22H20V24H2A2,2 0 0,1 0,22V8H2Z"}, {PackIconKind.EmailOpenMultipleOutline,"M2 8V22H20V24H2C.895 24 0 23.11 0 22V8H2M23.03 6.29L14 .64L4.97 6.29C4.39 6.64 4 7.27 4 8V18C4 19.1 4.9 20 6 20H22C23.1 20 24 19.1 24 18V8C24 7.27 23.61 6.64 23.03 6.29M22 18H6V10L14 15L22 10V18M14 13L6 8L14 3L22 8L14 13Z"}, {PackIconKind.EmailOpenOutline,"M21.03 6.29L12 .64L2.97 6.29C2.39 6.64 2 7.27 2 8V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 7.27 21.61 6.64 21.03 6.29M20 18H4V10L12 15L20 10V18M12 13L4 8L12 3L20 8L12 13Z"}, @@ -4042,6 +4045,7 @@ internal static class PackIconDataFactory {PackIconKind.LandPlots,"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2M4 4H8V14H4V4M4 20V16H8V20H4M20 20H10V10H20V20M20 8H10V4H20V8Z"}, {PackIconKind.LandPlotsCircle,"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2M13 7.5C13 5.6 14.6 4 16.5 4C18.4 4 20 5.6 20 7.5C20 9.4 18.4 11 16.5 11C14.6 11 13 9.4 13 7.5M4 4H11V11H4V4M4 20V13H11V20H4M20 20H13V13H20V20Z"}, {PackIconKind.LandPlotsCircleVariant,"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2M20 9C20 11.8 17.8 14 15 14C12.2 14 10 11.8 10 9C10 6.2 12.2 4 15 4C17.8 4 20 6.2 20 9M4 4H8V14H4V4M4 20V16H8V20H4M20 20H10V16H20V20Z"}, + {PackIconKind.LandPlotsMarker,"M4 2H20C21.1 2 22 2.9 22 4V10H10V20H14.55C14.73 20.3 14.91 20.58 15.09 20.84C15.38 21.27 15.66 21.66 15.92 22H4C2.9 22 2 21.1 2 20V4C2 2.9 2.9 2 4 2M8 4H4V14H8V4M4 16V20H8V16H4M10 8H20V4H10V8M18.5 22C18.5 22 17.92 21.35 17.23 20.41C17.14 20.28 17.04 20.14 16.94 20C16 18.66 15 16.89 15 15.5C15 13.6 16.6 12 18.5 12C19.03 12 19.54 12.13 20 12.35C21.17 12.92 22 14.13 22 15.5C22 17.04 20.77 19.04 19.77 20.41C19.08 21.35 18.5 22 18.5 22M17.3 15.6C17.3 16.2 17.8 16.8 18.5 16.8C19.2 16.8 19.8 16.2 19.7 15.6C19.7 15 19.1 14.4 18.5 14.4C17.9 14.4 17.3 14.9 17.3 15.6Z"}, {PackIconKind.LandRowsHorizontal,"M22 20V4C22 2.9 21.1 2 20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20M4 6.5V4H20V6.5H4M4 11V8.5H20V11H4M4 15.5V13H20V15.5H4M4 20V17.5H20V20H4Z"}, {PackIconKind.LandRowsVertical,"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.1 2.9 22 4 22H20C21.1 22 22 21.1 22 20V4C22 2.9 21.1 2 20 2M6.5 20H4V4H6.5V20M11 20H8.5V4H11V20M15.5 20H13V4H15.5V20M20 20H17.5V4H20V20Z"}, {PackIconKind.Landslide,"M15.47 13.79L12.89 12.76L6 15.05L2 13.5V15.61L6 16.95L15.47 13.79M10.57 11.42L8 8H2V11.61L6 12.95L10.57 11.42M6 19.05L2 17.72V22H22L17.03 15.38L6 19.05M17 6V1L12 0L9 2V6L12 8L17 6M18.5 7L16 9V12L18.5 14L23 12V8L18.5 7Z"}, @@ -5409,6 +5413,7 @@ internal static class PackIconDataFactory {PackIconKind.RadioactiveOff,"M1,4.27L2.28,3L21,21.72L19.73,23L17.25,20.5C15.72,21.46 13.92,22 12,22C10.05,22 8.22,21.44 6.69,20.47L10,15.47C10.6,15.81 11.28,16 12,16C12.23,16 12.46,16 12.67,15.94L8.06,11.33C8,11.54 8,11.77 8,12H2C2,10.08 2.54,8.28 3.5,6.75L1,4.27M12,10A2,2 0 0,1 14,12V12.17L11.83,10H12M8.11,2.78L10.23,8.41L5.9,4.08C6.57,3.56 7.32,3.12 8.11,2.78M16,12C16,10.38 15.04,9 13.66,8.36L15.89,2.78C19.5,4.3 22,7.86 22,12H16Z"}, {PackIconKind.RadioAm,"M5,7A2,2 0 0,0 3,9V17H5V13H7V17H9V9A2,2 0 0,0 7,7H5M5,9H7V11H5V9M13,7A2,2 0 0,0 11,9V17H13V9H15V16H17V9H19V17H21V9A2,2 0 0,0 19,7H13Z"}, {PackIconKind.RadioboxBlank,"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}, + {PackIconKind.RadioboxIndeterminateVariant,"M8.46 8.46C9.4 7.53 10.67 7 12 7C13.33 7 14.6 7.53 15.54 8.46L8.46 15.54C7.53 14.6 7 13.33 7 12C7 10.67 7.53 9.4 8.46 8.46M8.17 2.76C9.39 2.26 10.69 2 12 2C13.31 2 14.61 2.26 15.83 2.76C17.04 3.26 18.14 4 19.07 4.93C20 5.86 20.74 6.96 21.24 8.17C21.74 9.39 22 10.69 22 12C22 14.65 20.95 17.2 19.07 19.07C17.2 20.95 14.65 22 12 22C10.69 22 9.39 21.74 8.17 21.24C6.96 20.74 5.86 20 4.93 19.07C3.05 17.2 2 14.65 2 12C2 9.35 3.05 6.8 4.93 4.93C5.86 4 6.96 3.26 8.17 2.76M6.34 17.66C7.84 19.16 9.88 20 12 20C14.12 20 16.16 19.16 17.66 17.66C19.16 16.16 20 14.12 20 12C20 9.88 19.16 7.84 17.66 6.34C16.16 4.84 14.12 4 12 4C9.88 4 7.84 4.84 6.34 6.34C4.84 7.84 4 9.88 4 12C4 14.12 4.84 16.16 6.34 17.66Z"}, {PackIconKind.RadioboxMarked,"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z"}, {PackIconKind.RadioFm,"M3,7V17H5V13H8V11H5V9H9V7H3M13,7A2,2 0 0,0 11,9V17H13V9H15V16H17V9H19V17H21V9A2,2 0 0,0 19,7H13Z"}, {PackIconKind.RadioHandheld,"M9,2A1,1 0 0,0 8,3C8,8.67 8,14.33 8,20C8,21.11 8.89,22 10,22H15C16.11,22 17,21.11 17,20V9C17,7.89 16.11,7 15,7H10V3A1,1 0 0,0 9,2M10,9H15V13H10V9Z"}, @@ -6480,6 +6485,7 @@ internal static class PackIconDataFactory {PackIconKind.TempleHinduOutline,"M20 11V13H18L15 3V1H13V3H11V1H9V3.1L6 13H4V11H2V22H11V17H13V22H22V11H20M15.3 11H8.7L9.3 9H14.7L15.3 11M14.1 7H9.9L10.5 5H13.5L14.1 7M20 20H15V15H9V20H4V15H7.5L8.1 13H15.9L16.5 15H20V20Z"}, {PackIconKind.Tennis,"M18,15A4,4 0 0,1 22,19A4,4 0 0,1 18,23A4,4 0 0,1 14,19A4,4 0 0,1 18,15M18,17A2,2 0 0,0 16,19A2,2 0 0,0 18,21A2,2 0 0,0 20,19A2,2 0 0,0 18,17M6.05,14.54C6.05,14.54 7.46,13.12 7.47,10.3C7.11,8.11 7.97,5.54 9.94,3.58C12.87,0.65 17.14,0.17 19.5,2.5C21.83,4.86 21.35,9.13 18.42,12.06C16.46,14.03 13.89,14.89 11.7,14.53C8.88,14.54 7.46,15.95 7.46,15.95L3.22,20.19L1.81,18.78L6.05,14.54M18.07,3.93C16.5,2.37 13.5,2.84 11.35,5C9.21,7.14 8.73,10.15 10.29,11.71C11.86,13.27 14.86,12.79 17,10.65C19.16,8.5 19.63,5.5 18.07,3.93Z"}, {PackIconKind.TennisBall,"M12,2C14.5,2 16.75,2.9 18.5,4.4C16.36,6.23 15,8.96 15,12C15,15.04 16.36,17.77 18.5,19.6C16.75,21.1 14.5,22 12,22C9.5,22 7.25,21.1 5.5,19.6C7.64,17.77 9,15.04 9,12C9,8.96 7.64,6.23 5.5,4.4C7.25,2.9 9.5,2 12,2M22,12C22,14.32 21.21,16.45 19.88,18.15C18.12,16.68 17,14.47 17,12C17,9.53 18.12,7.32 19.88,5.85C21.21,7.55 22,9.68 22,12M2,12C2,9.68 2.79,7.55 4.12,5.85C5.88,7.32 7,9.53 7,12C7,14.47 5.88,16.68 4.12,18.15C2.79,16.45 2,14.32 2,12Z"}, + {PackIconKind.TennisBallOutline,"M8.17 2.76C9.39 2.26 10.69 2 12 2C13.31 2 14.61 2.26 15.83 2.76C17.04 3.26 18.14 4 19.07 4.93C20 5.86 20.74 6.96 21.24 8.17C21.74 9.39 22 10.69 22 12C22 14.65 20.95 17.2 19.07 19.07C17.2 20.95 14.65 22 12 22C10.69 22 9.39 21.74 8.17 21.24C6.96 20.74 5.86 20 4.93 19.07C3.05 17.2 2 14.65 2 12C2 9.35 3.05 6.8 4.93 4.93C5.86 4 6.96 3.26 8.17 2.76M6.89 18.15C8.32 19.34 10.12 20 12 20C13.88 20 15.68 19.34 17.11 18.15C15.79 16.46 15 14.32 15 12C15 9.68 15.79 7.55 17.11 5.85C15.69 4.66 13.88 4 12 4C10.12 4 8.32 4.66 6.89 5.85C8.21 7.55 9 9.68 9 12C9 14.32 8.21 16.46 6.89 18.15M5.5 16.67C6.44 15.35 7 13.74 7 12C7 10.26 6.44 8.65 5.5 7.34C4.53 8.69 4 10.32 4 12C4 13.68 4.53 15.31 5.5 16.67M18.5 7.34C17.56 8.65 17 10.26 17 12C17 13.74 17.56 15.35 18.5 16.67C19.47 15.31 20 13.69 20 12C20 10.32 19.47 8.69 18.5 7.34Z"}, {PackIconKind.Tent,"M4,6C4,7.19 4.39,8.27 5,9A3,3 0 0,1 2,6A3,3 0 0,1 5,3C4.39,3.73 4,4.81 4,6M2,21V19H4.76L12,4.78L19.24,19H22V21H2M12,9.19L7,19H17L12,9.19Z"}, {PackIconKind.Terraform,"M21 5.4V11.8L15.4 15V8.7L21 5.4M14.8 8.7V15L9.2 11.8V5.4L14.8 8.7M14.8 15.7V22.1L9.2 18.9V12.5L14.8 15.7M8.6 5.1V11.5L3 8.3V1.9L8.6 5.1Z"}, {PackIconKind.Terrain,"M14,6L10.25,11L13.1,14.8L11.5,16C9.81,13.75 7,10 7,10L1,18H23L14,6Z"}, @@ -6663,6 +6669,7 @@ internal static class PackIconDataFactory {PackIconKind.Torch,"M8.6 9.6C9 10.2 9.5 10.7 10.2 11H14.2C14.5 10.9 14.7 10.7 14.9 10.5C15.9 9.5 16.3 8 15.8 6.7L15.7 6.5C15.6 6.2 15.4 6 15.2 5.8C15.1 5.6 14.9 5.5 14.8 5.3C14.4 5 14 4.7 13.6 4.3C12.7 3.4 12.6 2 13.1 1C12.6 1.1 12.1 1.4 11.7 1.8C10.2 3 9.6 5.1 10.3 7V7.2C10.3 7.3 10.2 7.4 10.1 7.5C10 7.6 9.8 7.5 9.7 7.4L9.6 7.3C9 6.5 8.9 5.3 9.3 4.3C8.4 5.1 7.9 6.4 8 7.7C8 8 8.1 8.3 8.2 8.6C8.2 8.9 8.4 9.3 8.6 9.6M12.3 8.1C12.4 7.6 12.2 7.2 12.1 6.8C12 6.4 12 6 12.2 5.6L12.5 6.2C12.9 6.8 13.6 7 13.8 7.8V8.1C13.8 8.6 13.6 9.1 13.3 9.4C13.1 9.5 12.9 9.7 12.7 9.7C12.1 9.9 11.4 9.6 11 9.2C11.8 9.2 12.2 8.6 12.3 8.1M15 12V14H14L13 22H11L10 14H9V12H15Z"}, {PackIconKind.Tortoise,"M19.31,5.6C18.09,5.56 16.88,6.5 16.5,8C16,10 16,10 15,11C13,13 10,14 4,15C3,15.16 2.5,15.5 2,16C4,16 6,16 4.5,17.5L3,19H6L8,17C10,18 11.33,18 13.33,17L14,19H17L16,16C16,16 17,12 18,11C19,10 19,11 20,11C21,11 22,10 22,8.5C22,8 22,7 20.5,6C20.15,5.76 19.74,5.62 19.31,5.6M9,6A6,6 0 0,0 3,12C3,12.6 3.13,13.08 3.23,13.6C9.15,12.62 12.29,11.59 13.93,9.94L14.43,9.44C13.44,7.34 11.32,6 9,6Z"}, {PackIconKind.Toslink,"M20 10V7L17 4H7L4 7V10C2.9 10 2 10.9 2 12S2.9 14 4 14V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V14C21.11 14 22 13.11 22 12S21.11 10 20 10M12 16C9.79 16 8 14.21 8 12S9.79 8 12 8 16 9.79 16 12 14.21 16 12 16M14 12C14 13.11 13.11 14 12 14S10 13.11 10 12 10.9 10 12 10 14 10.9 14 12Z"}, + {PackIconKind.TouchTextOutline,"M7 7H17V9H7V7M12.69 15.81H13.2V15H7V17H10.38L10.71 16.65C11.18 16.13 11.92 15.81 12.69 15.81M9 19H5V5H19V13.56L21 14.45V5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H11.33L9 19M7 13H13.2V11.73C13.2 11.5 13.25 11.24 13.31 11H7V13M15.2 19.07L12.85 17.81H12.69C12.5 17.81 12.29 17.89 12.15 18.04L11.61 18.61L15.2 21.69C15.39 21.89 15.66 22 15.93 22H20.7C21.3 22 21.78 21.5 21.8 20.9V17.7C21.8 17.28 21.57 16.89 21.18 16.71L17.55 15.11L16.67 15V11.73C16.67 11.33 16.34 11 15.93 11C15.53 11 15.2 11.33 15.2 11.73V19.07Z"}, {PackIconKind.Tournament,"M2,2V4H7V8H2V10H7C8.11,10 9,9.11 9,8V7H14V17H9V16C9,14.89 8.11,14 7,14H2V16H7V20H2V22H7C8.11,22 9,21.11 9,20V19H14C15.11,19 16,18.11 16,17V13H22V11H16V7C16,5.89 15.11,5 14,5H9V4C9,2.89 8.11,2 7,2H2Z"}, {PackIconKind.TowerBeach,"M17,4V8H18V10H17.64L21,23H18.93L18.37,20.83L12,17.15L5.63,20.83L5.07,23H3L6.36,10H6V8H7V4H6V3L18,1V4H17M7.28,14.43L6.33,18.12L10,16L7.28,14.43M15.57,10H8.43L7.8,12.42L12,14.85L16.2,12.42L15.57,10M17.67,18.12L16.72,14.43L14,16L17.67,18.12Z"}, {PackIconKind.TowerFire,"M17,4V8H18V10H17.64L21,23H18.93L18.37,20.83L12,17.15L5.63,20.83L5.07,23H3L6.36,10H6V8H7V4H6V3L12,1L18,3V4H17M7.28,14.43L6.33,18.12L10,16L7.28,14.43M15.57,10H8.43L7.8,12.42L12,14.85L16.2,12.42L15.57,10M17.67,18.12L16.72,14.43L14,16L17.67,18.12Z"}, @@ -6963,6 +6970,7 @@ internal static class PackIconDataFactory {PackIconKind.ViewGallery,"M21 3H2V16H21V3M2 17H6V21H2V17M7 17H11V21H7V17M12 17H16V21H12V17M17 17H21V21H17V17Z"}, {PackIconKind.ViewGalleryOutline,"M1 3V21H23V3H1M21 5V14H3V5H21M11 16V19H8V16H11M3 16H6V19H3V16M13 19V16H16V19H13M18 19V16H21V19H18Z"}, {PackIconKind.ViewGrid,"M3,11H11V3H3M3,21H11V13H3M13,21H21V13H13M13,3V11H21V3"}, + {PackIconKind.ViewGridCompact,"M2 5H4V7H2V5M5 5H7V7H5V5M8 5H10V7H8V5M11 5H13V7H11V5M14 5H16V7H14V5M17 5H19V7H17V5M20 5H22V7H20V5M2 8H4V10H2V8M5 8H7V10H5V8M8 8H10V10H8V8M11 8H13V10H11V8M14 8H16V10H14V8M17 8H19V10H17V8M20 8H22V10H20V8M2 11H4V13H2V11M5 11H7V13H5V11M8 11H10V13H8V11M11 11H13V13H11V11M14 11H16V13H14V11M17 11H19V13H17V11M20 11H22V13H20V11M2 14H4V16H2V14M5 14H7V16H5V14M8 14H10V16H8V14M11 14H13V16H11V14M14 14H16V16H14V14M17 14H19V16H17V14M20 14H22V16H20V14M2 17H4V19H2V17M5 17H7V19H5V17M8 17H10V19H8V17M11 17H13V19H11V17M14 17H16V19H14V17M17 17H19V19H17V17M20 17H22V19H20V17"}, {PackIconKind.ViewGridOutline,"M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z"}, {PackIconKind.ViewGridPlus,"M13 3V11H21V3H13M3 21H11V13H3V21M3 3V11H11V3H3M13 16H16V13H18V16H21V18H18V21H16V18H13V16Z"}, {PackIconKind.ViewGridPlusOutline,"M3 21H11V13H3M5 15H9V19H5M3 11H11V3H3M5 5H9V9H5M13 3V11H21V3M19 9H15V5H19M18 16H21V18H18V21H16V18H13V16H16V13H18Z"}, diff --git a/MaterialDesignThemes.Wpf/PackIconKind.cs b/MaterialDesignThemes.Wpf/PackIconKind.cs index 568a83eea0..f7770c82c4 100644 --- a/MaterialDesignThemes.Wpf/PackIconKind.cs +++ b/MaterialDesignThemes.Wpf/PackIconKind.cs @@ -1711,6 +1711,7 @@ public enum PackIconKind BaseballBat, BaseballDiamond, BaseballDiamondOutline, + BaseballOutline, Bash, Basket, ShoppingBasket=Basket, @@ -4891,6 +4892,10 @@ public enum PackIconKind EmailSendOutline=EmailFastOutline, EmailSentOutline=EmailFastOutline, EnvelopeFastOutline=EmailFastOutline, + EmailHeartOutline, + EnvelopeHeartOutline=EmailHeartOutline, + GreetingCard=EmailHeartOutline, + LoveLetter=EmailHeartOutline, EmailLock, EmailSecure=EmailLock, EnvelopeLock=EmailLock, @@ -4908,6 +4913,10 @@ public enum PackIconKind EmailOpen, Drafts=EmailOpen, EnvelopeOpen=EmailOpen, + EmailOpenHeartOutline, + EnvelopeOpenHeartOutline=EmailOpenHeartOutline, + GreetingCardOpen=EmailOpenHeartOutline, + LoveLetterOpen=EmailOpenHeartOutline, EmailOpenMultiple, EmailOpenMultipleOutline, EmailOpenOutline, @@ -7483,6 +7492,7 @@ public enum PackIconKind LandPlots, LandPlotsCircle, LandPlotsCircleVariant, + LandPlotsMarker, LandRowsHorizontal, LandRowsVertical, Landslide, @@ -10213,6 +10223,9 @@ public enum PackIconKind RadioAm, RadioboxBlank, RadioButtonUnchecked=RadioboxBlank, + RadioboxIndeterminateVariant, + RadioboxIntermediateVariant=RadioboxIndeterminateVariant, + RadioButtonIndeterminate=RadioboxIndeterminateVariant, RadioboxMarked, RadioButtonChecked=RadioboxMarked, RadioFm, @@ -11988,6 +12001,7 @@ public enum PackIconKind TennisRacket=Tennis, TennisRacquet=Tennis, TennisBall, + TennisBallOutline, Tent, Camping=Tent, Terraform, @@ -12344,6 +12358,7 @@ public enum PackIconKind Tortoise, Toslink, OpticalAudio=Toslink, + TouchTextOutline, Tournament, Bracket=Tournament, TowerBeach, @@ -12776,6 +12791,7 @@ public enum PackIconKind ViewGallery, ViewGalleryOutline, ViewGrid, + ViewGridCompact, ViewGridOutline, ViewGridPlus, ViewGridAdd=ViewGridPlus, From c3f9d9fbc2a3ad3735a361de0bc402042fcb4fa9 Mon Sep 17 00:00:00 2001 From: Nicolai Henriksen Date: Sat, 4 Feb 2023 19:30:49 +0100 Subject: [PATCH 14/36] Update IsItemsHost on changes to Visibility rather than IsVisible (#3073) --- MaterialDesignThemes.Wpf/TabAssist.cs | 10 +++++----- .../Themes/MaterialDesignTheme.TabControl.xaml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MaterialDesignThemes.Wpf/TabAssist.cs b/MaterialDesignThemes.Wpf/TabAssist.cs index b8cb65141c..258aef59ad 100644 --- a/MaterialDesignThemes.Wpf/TabAssist.cs +++ b/MaterialDesignThemes.Wpf/TabAssist.cs @@ -16,20 +16,20 @@ public static class TabAssist public static bool GetHasUniformTabWidth(DependencyObject element) => (bool)element.GetValue(HasUniformTabWidthProperty); - internal static bool GetBindableIsItemsHost(DependencyObject obj) - => (bool)obj.GetValue(BindableIsItemsHostProperty); + internal static Visibility GetBindableIsItemsHost(DependencyObject obj) + => (Visibility)obj.GetValue(BindableIsItemsHostProperty); - internal static void SetBindableIsItemsHost(DependencyObject obj, bool value) + internal static void SetBindableIsItemsHost(DependencyObject obj, Visibility value) => obj.SetValue(BindableIsItemsHostProperty, value); internal static readonly DependencyProperty BindableIsItemsHostProperty = - DependencyProperty.RegisterAttached("BindableIsItemsHost", typeof(bool), typeof(TabAssist), new PropertyMetadata(false, OnBindableIsItemsHostChanged)); + DependencyProperty.RegisterAttached("BindableIsItemsHost", typeof(Visibility), typeof(TabAssist), new PropertyMetadata(Visibility.Collapsed, OnBindableIsItemsHostChanged)); private static void OnBindableIsItemsHostChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is Panel panel) { - panel.IsItemsHost = (bool)e.NewValue; + panel.IsItemsHost = (Visibility)e.NewValue == Visibility.Visible; } } } diff --git a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml index e275d2851f..0d59e7b440 100644 --- a/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml +++ b/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TabControl.xaml @@ -50,14 +50,14 @@ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" - wpf:TabAssist.BindableIsItemsHost="{Binding IsVisible, RelativeSource={RelativeSource Self}}" + wpf:TabAssist.BindableIsItemsHost="{Binding Visibility, RelativeSource={RelativeSource Self}}" KeyboardNavigation.TabIndex="1" Rows="1" /> From 5a5c3be63715d1f4d4c56258fa4933819ff33bef Mon Sep 17 00:00:00 2001 From: JorisCleVR Date: Thu, 9 Feb 2023 06:21:55 +0100 Subject: [PATCH 15/36] Fix to make md:TextFieldAssist.HasClearButton="True" work within a ControlTemplate (#3078) --- MaterialDesignThemes.Wpf/Internal/ClearText.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaterialDesignThemes.Wpf/Internal/ClearText.cs b/MaterialDesignThemes.Wpf/Internal/ClearText.cs index 0dc7417eee..9f05c1fade 100644 --- a/MaterialDesignThemes.Wpf/Internal/ClearText.cs +++ b/MaterialDesignThemes.Wpf/Internal/ClearText.cs @@ -35,7 +35,7 @@ private static void OnHandlesClearCommandChanged(DependencyObject d, DependencyP static void OnClearCommand(object sender, ExecutedRoutedEventArgs e) { - switch (e.Source) + switch (sender) { case DatePicker datePicker: datePicker.SetCurrentValue(DatePicker.SelectedDateProperty, null); From 50a7885ecd3d86b9f64196949e3a8235e126513e Mon Sep 17 00:00:00 2001 From: Kevin B Date: Wed, 8 Feb 2023 21:34:15 -0800 Subject: [PATCH 16/36] Adding UI Test for the condition (#3079) --- .../ContentControls/ContentControlTests.cs | 43 ++++++++++ .../Internal/ClearText.cs | 81 +++++++++---------- 2 files changed, 83 insertions(+), 41 deletions(-) create mode 100644 MaterialDesignThemes.UITests/WPF/ContentControls/ContentControlTests.cs diff --git a/MaterialDesignThemes.UITests/WPF/ContentControls/ContentControlTests.cs b/MaterialDesignThemes.UITests/WPF/ContentControls/ContentControlTests.cs new file mode 100644 index 0000000000..11647143c7 --- /dev/null +++ b/MaterialDesignThemes.UITests/WPF/ContentControls/ContentControlTests.cs @@ -0,0 +1,43 @@ +using System.ComponentModel; + +namespace MaterialDesignThemes.UITests.WPF.ContentControls; + +public class ContentControlTests : TestBase +{ + public ContentControlTests(ITestOutputHelper output) + : base(output) + { + } + + + [Fact] + [Description("Issue 2510")] + public async Task ClearButton_InsideOfControlTemplate_CanStillClearContent() + { + await using var recorder = new TestRecorder(App); + + //Arrange + var grid = await LoadXaml(@" + + + + + + +"); + var textBox = await grid.GetElement("/TextBox"); + var clearButton = await grid.GetElement