diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..b26c0ad90e --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,225 @@ +# Copilot Instructions for MaterialDesignInXamlToolkit + +## Repository Overview + +The MaterialDesignInXamlToolkit is a **theme library** for WPF applications that provides Material Design themes and styling. This is NOT a control library - the focus is on theming existing WPF controls and providing custom controls only when necessary to support Google's Material Design specifications. + +### Key Principles +- Theme library, not control library +- Styling existing WPF controls to match Material Design +- Custom controls only for Google-specified components that don't exist in WPF +- No application or business logic belongs in this library +- Provide base tools and springboard for developers to create their own controls + +## Architecture and Structure + +### Core Projects +- **`MaterialDesignThemes.Wpf`** - Main theming library with styles, templates, and controls +- **`MaterialDesignColors.Wpf`** - Color palette and theme management +- **`MaterialDesignThemes.MahApps`** - Integration with MahApps.Metro +- **`MainDemo.Wpf`** - Primary demonstration application +- **`MaterialDesign3.Demo.Wpf`** - Material Design 3 demonstration +- **`MaterialDesignToolkit.ResourceGeneration`** - Build-time resource generation tools + +### Key Technologies +- **WPF (Windows Presentation Foundation)** - UI framework +- **XAML** - Markup for UI definitions and styles +- **Material Design** - Google's design system implementation +- **.NET 8** and **.NET Framework 4.7.2** - Target frameworks for the library +- **.NET 9 SDK** - Required for building (as specified in `global.json`) +- **C# 12.0** - Programming language +- **PowerShell** - Build automation scripts + +## Development Environment + +### Requirements +- **Windows** - Required for WPF development and compilation +- **.NET 9 SDK** - As specified in `global.json` (note: projects target .NET 8 and .NET Framework 4.7.2) +- **Visual Studio 2022** or **Visual Studio Code** with C# extension +- **PowerShell** - For build scripts + +### Build and Test +```powershell +# Restore dependencies +dotnet restore MaterialDesignToolkit.Full.sln + +# Build (requires Windows) +dotnet build MaterialDesignToolkit.Full.sln --configuration Release --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True + +# Run tests +dotnet test MaterialDesignToolkit.Full.sln --configuration Release --no-build + +# Build NuGet packages +.\build\BuildNugets.ps1 -MDIXVersion "x.x.x" -MDIXColorsVersion "x.x.x" -MDIXMahAppsVersion "x.x.x" +``` + +## Code Style and Conventions + +### General Guidelines +- Follow standard Visual Studio settings with ReSharper suggestions +- Use .editorconfig settings (4-space indents for C#, 2-space for XAML/XML) +- Allman brace style (`csharp_new_line_before_open_brace = all`) +- No `this.` qualification unless necessary +- Prefer explicit types over `var` for built-in types +- Use PascalCase for public members, interfaces start with `I` + +### C# Conventions +```csharp +// Preferred dependency property pattern +public static readonly DependencyProperty MyPropertyProperty = + DependencyProperty.Register("MyProperty", typeof(string), typeof(MyControl), + new UIPropertyMetadata("DefaultValue", OnMyPropertyChanged)); + +public string MyProperty +{ + get => (string)GetValue(MyPropertyProperty); + set => SetValue(MyPropertyProperty, value); +} + +private static void OnMyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) +{ + var control = (MyControl)d; + // Handle property change +} +``` + +### XAML Style Guidelines +- Use XamlStyler settings from `Settings.XamlStyler` +- 2-space indentation for XAML +- Keep first attribute on same line as element +- Order attributes according to defined groups +- Use `{StaticResource}` over `{DynamicResource}` where possible +- Follow resource naming: `MaterialDesign.Brush.Primary.Light` + +## WPF and Material Design Context + +### Theme Architecture +- **Base Themes**: Light and Dark variants +- **Color System**: Primary, Secondary, Surface, Background colors with variants +- **Elevation**: Shadow and overlay systems for depth +- **Typography**: Material Design text styles +- **Motion**: Transitions and animations + +### Common Patterns +```csharp +// Theme modification pattern +private static void ModifyTheme(Action modificationAction) +{ + var paletteHelper = new PaletteHelper(); + Theme theme = paletteHelper.GetTheme(); + + modificationAction?.Invoke(theme); + + paletteHelper.SetTheme(theme); +} + +// Color adjustment usage +theme.ColorAdjustment = new ColorAdjustment +{ + DesiredContrastRatio = desiredRatio, + Contrast = contrastValue, + Colors = colorSelection +}; +``` + +### Resource Dictionary Patterns +```xml + + + + + + + + +``` + +## Testing Approach + +### Test Structure +- **Unit Tests**: `MaterialDesignThemes.Wpf.Tests`, `MaterialDesignColors.Wpf.Tests` +- **UI Tests**: `MaterialDesignThemes.UITests` - Visual/integration testing +- **Demo Applications**: Manual testing and showcasing functionality + +### Test Patterns +```csharp +[Test] +public async Task ThemeTest_Example() +{ + await App.InitializeWithMaterialDesign( + baseTheme: BaseTheme.Light, + primary: PrimaryColor.Blue, + secondary: SecondaryColor.Orange); + + // Test implementation +} +``` + +## Build Pipeline and Automation + +### GitHub Actions Workflows +- **PR Verification**: `pr_verification.yml` - Build and test on PRs +- **Build Artifacts**: `build_artifacts.yml` - Main build pipeline +- **Release**: `release.yml` - Create releases and publish NuGets + +### PowerShell Build Scripts +- **`BuildNugets.ps1`** - Package creation +- **`ApplyXamlStyler.ps1`** - Code formatting +- **`MigrateBrushes.ps1`** - Resource migration utilities +- **`UpdateNugets.ps1`** - Package management + +## Domain-Specific Knowledge + +### Material Design Implementation +- Follow Google Material Design guidelines strictly +- Implement elevation through shadows and overlays +- Use consistent color theming system +- Support both Material Design 2 and 3 specifications +- Ensure accessibility compliance (contrast ratios, touch targets) + +### WPF Theming Best Practices +- Use `TemplateBinding` for connecting to parent properties +- Implement proper focus visuals and keyboard navigation +- Support high contrast mode and accessibility features +- Use appropriate triggers for state changes (hover, pressed, disabled) +- Leverage WPF's dependency property system effectively + +### Resource Organization +- Brush resources: `MaterialDesign.Brush.*` +- Style resources: Clear, descriptive names matching WPF conventions +- Template resources: Match control types and variants +- Color resources: Follow Material Design naming (Primary, Secondary, Surface, etc.) + +## API Design Guidelines + +- **Maintain backward compatibility** - This is a widely-used library +- **Minimal public API surface** - Only expose what's necessary +- **Consistent naming** - Follow WPF and Material Design conventions +- **Proper documentation** - XML docs for all public APIs +- **Designer support** - Ensure controls work well in Visual Studio designer + +## Common Tasks and Patterns + +### Adding a New Style +1. Define in appropriate XAML resource dictionary +2. Follow existing naming conventions +3. Test in demo applications +4. Ensure accessibility compliance +5. Add to migration scripts if replacing existing styles + +### Theme Modifications +1. Use `PaletteHelper` for runtime theme changes +2. Support both static and dynamic resource binding +3. Test with both Light and Dark themes +4. Verify color adjustments work properly + +### Custom Control Development +1. Only when no WPF equivalent exists +2. Follow Material Design specifications exactly +3. Implement proper template parts and visual states +4. Support theming and color adjustments +5. Include comprehensive tests and demo usage + +Remember: This library's primary goal is to provide a complete, high-quality Material Design theming solution for WPF applications while maintaining excellent performance and broad compatibility. \ No newline at end of file diff --git a/.github/workflows/build_artifacts.yml b/.github/workflows/build_artifacts.yml index 851278a9dc..b618238889 100644 --- a/.github/workflows/build_artifacts.yml +++ b/.github/workflows/build_artifacts.yml @@ -26,10 +26,10 @@ jobs: solution: MaterialDesignToolkit.Full.sln steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: dotnet-version: | 8.x @@ -54,7 +54,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Screenshots-${{ github.run_number }} - path: ${{ github.workspace }}tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net8.0-windows7\Screenshots + path: ${{ github.workspace }}\tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net9.0-windows\Screenshots if-no-files-found: ignore - name: Build NuGets diff --git a/.github/workflows/control_styles.yml b/.github/workflows/control_styles.yml index ed96333681..0950e8bdb3 100644 --- a/.github/workflows/control_styles.yml +++ b/.github/workflows/control_styles.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Generate Control Styles Markdown run: build/GenerateThemesWikiMarkdown.ps1 shell: pwsh diff --git a/.github/workflows/get_versions.yml b/.github/workflows/get_versions.yml index c916fd7535..5199eb5c0a 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: "5.2.2" - mdix-colors-version: "5.2.2" - mdix-mahapps-version: "5.2.2" + mdix-version: "5.3.1" + mdix-colors-version: "5.3.1" + mdix-mahapps-version: "5.3.1" name: Set version numbers runs-on: ubuntu-latest defaults: diff --git a/.github/workflows/icon_update.yml b/.github/workflows/icon_update.yml index 6ed35c39de..73e881b250 100644 --- a/.github/workflows/icon_update.yml +++ b/.github/workflows/icon_update.yml @@ -20,7 +20,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Run Icon Generation run: dotnet run -c Release -- icons diff --git a/.github/workflows/nightly_release.yml b/.github/workflows/nightly_release.yml index 088b31b786..decab0e9df 100644 --- a/.github/workflows/nightly_release.yml +++ b/.github/workflows/nightly_release.yml @@ -60,7 +60,7 @@ jobs: steps: - name: Download NuGet Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: NuGets path: nugets diff --git a/.github/workflows/pr_verification.yml b/.github/workflows/pr_verification.yml index 887011ec32..9b4731b22a 100644 --- a/.github/workflows/pr_verification.yml +++ b/.github/workflows/pr_verification.yml @@ -29,4 +29,4 @@ jobs: contents: write steps: - - uses: fastify/github-action-merge-dependabot@v3.11.1 + - uses: fastify/github-action-merge-dependabot@v3.11.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 844f0aec2b..f2f62d3486 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,12 +85,12 @@ jobs: name: Get Icon Changes steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - name: Download NuGet Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: NuGets path: nugets @@ -124,13 +124,13 @@ jobs: steps: - name: Download NuGet Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: NuGets path: nugets - name: Download Demo App Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: DemoApp path: demo-app @@ -139,7 +139,7 @@ jobs: run: zip -r DemoApp.zip demo-app/* - name: Download Release Notes - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: ReleaseNotes @@ -156,12 +156,12 @@ jobs: steps: - name: Checkout Wiki Repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: ${{ github.repository }}.wiki - name: Download Icon Changes - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: IconChanges path: icon-changes @@ -224,7 +224,7 @@ jobs: steps: - name: Download NuGet Artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: NuGets path: nugets @@ -254,7 +254,7 @@ jobs: # Doing a checkout, until this issue is resolved. # https://github.com/valeriobelli/gh-milestone/issues/15 # As of version 2.1.0 the -R doesn't appear to output valid json when filtering. So still using the checkout. - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Close Milestone run: | @@ -274,7 +274,7 @@ jobs: steps: # Checkout is needed so that we can update the get_versions.yml file - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Increment Version Numbers run: | @@ -305,6 +305,8 @@ jobs: Update-Version -Prefix "mdix-mahapps-version" - name: Open Pull Request + env: + GH_TOKEN: ${{ secrets.SA_PAT }} run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" diff --git a/.github/workflows/stale_issues_and_prs.yml b/.github/workflows/stale_issues_and_prs.yml index 93d7bb721b..88651c519b 100644 --- a/.github/workflows/stale_issues_and_prs.yml +++ b/.github/workflows/stale_issues_and_prs.yml @@ -8,7 +8,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: stale-issue-message: 'This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.' stale-pr-message: 'This PR is marked stale because it has been open 60 days with no activity. Remove stale label or update the PR, otherwise it will be closed in 14 days.' diff --git a/Directory.Build.props b/Directory.Build.props index d5c2513673..f01ab74c87 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,6 +15,17 @@ true true true + + + false + James Willock + James Willock + MIT + https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit + MaterialDesign.Icon.png + false + README.md + https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/releases @@ -30,4 +41,10 @@ + + + + + + \ No newline at end of file diff --git a/Directory.packages.props b/Directory.packages.props index 8fa27d2bfd..8c3acea706 100644 --- a/Directory.packages.props +++ b/Directory.packages.props @@ -1,9 +1,9 @@ - + - + @@ -14,7 +14,7 @@ - + @@ -24,11 +24,13 @@ + + - - - - + + + + diff --git a/MaterialDesignToolkit.Full.sln b/MaterialDesignToolkit.Full.sln index 6414dbdcc2..8810cebe10 100644 --- a/MaterialDesignToolkit.Full.sln +++ b/MaterialDesignToolkit.Full.sln @@ -63,6 +63,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaterialDesign3Demo", "src\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialDesignDemo.Shared", "src\MaterialDesignDemo.Shared\MaterialDesignDemo.Shared.csproj", "{B39795A7-D66A-4F2F-9F41-050838D14048}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialColorUtilities", "src\MaterialDesign3.MaterialColorUtilities\MaterialColorUtilities.csproj", "{2C29B80E-1689-43CE-85AC-71799666B4AC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialColorUtilities.Tests", "tests\MaterialColorUtilities.Tests\MaterialColorUtilities.Tests.csproj", "{91485BEA-759F-406E-87B7-68D94CF66DE4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -251,6 +255,38 @@ Global {B39795A7-D66A-4F2F-9F41-050838D14048}.Release|x64.Build.0 = Release|Any CPU {B39795A7-D66A-4F2F-9F41-050838D14048}.Release|x86.ActiveCfg = Release|Any CPU {B39795A7-D66A-4F2F-9F41-050838D14048}.Release|x86.Build.0 = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|ARM.ActiveCfg = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|ARM.Build.0 = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|x64.Build.0 = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Debug|x86.Build.0 = Debug|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|Any CPU.Build.0 = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|ARM.ActiveCfg = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|ARM.Build.0 = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|x64.ActiveCfg = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|x64.Build.0 = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|x86.ActiveCfg = Release|Any CPU + {2C29B80E-1689-43CE-85AC-71799666B4AC}.Release|x86.Build.0 = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|ARM.ActiveCfg = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|ARM.Build.0 = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|x64.ActiveCfg = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|x64.Build.0 = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|x86.ActiveCfg = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Debug|x86.Build.0 = Debug|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|Any CPU.Build.0 = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|ARM.ActiveCfg = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|ARM.Build.0 = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|x64.ActiveCfg = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|x64.Build.0 = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|x86.ActiveCfg = Release|Any CPU + {91485BEA-759F-406E-87B7-68D94CF66DE4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -262,6 +298,8 @@ Global {18401177-A30E-4330-8F6B-101DF876CE99} = {55087897-5F09-45CA-8E12-12B36B45F262} {98627CBE-F009-482E-97E9-C69C7135E91F} = {D34BE232-DE51-43C1-ABDC-B69003BB50FF} {B39795A7-D66A-4F2F-9F41-050838D14048} = {D34BE232-DE51-43C1-ABDC-B69003BB50FF} + {2C29B80E-1689-43CE-85AC-71799666B4AC} = {9E303A4A-3712-44B9-91EE-830FDC087795} + {91485BEA-759F-406E-87B7-68D94CF66DE4} = {9E303A4A-3712-44B9-91EE-830FDC087795} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {730B2F9E-74AE-46CE-9E61-89AA5C6D5DD3} diff --git a/README.md b/README.md index 04639c17e3..1d2bb5ec24 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,6 @@ This repository also contains 3 different demo applications: ## More examples * [Keboo/MaterialDesign.Examples](https://github.com/Keboo/MaterialDesignInXaml.Examples) -* [doobry](http://materialdesigninxaml.net/doobry) -* [F1ix](http://materialdesigninxaml.net/f1ix) * [Motion List](https://github.com/MaterialDesignInXAML/MotionList) ## FAQ @@ -191,4 +189,4 @@ Support this project by becoming a sponsor. Your logo will show up here with a l -[discord-server-url]: https://discord.keboo.dev \ No newline at end of file +[discord-server-url]: https://discord.keboo.dev diff --git a/build/BuildNugets.ps1 b/build/BuildNugets.ps1 index c59e7d9816..788be6d70d 100644 --- a/build/BuildNugets.ps1 +++ b/build/BuildNugets.ps1 @@ -8,68 +8,22 @@ $year = [System.DateTime]::Now.ToString("yyyy") $copyright = "Copyright $year James Willock/Mulholland Software Ltd" $configuration = "Release" -function Update-Icon { +function New-DotNetPackage { param ( - [string]$Path - ) - $Path = Resolve-Path $Path - [xml] $xml = Get-Content $Path - [string] $iconUrl = $xml.package.metadata.iconUrl; - if (![string]::IsNullOrWhiteSpace($iconUrl) -and [string]::IsNullOrWhiteSpace($xml.package.metadata.icon)) { - $nugetIconFile = "$($xml.package.metadata.id).Icon.png"; - $nugetIconPath = Join-Path (Split-Path $Path -Parent) $nugetIconFile - Write-Host "Downloading icon from $iconUrl to $nugetIconPath" - Invoke-WebRequest $iconUrl -OutFile "$nugetIconPath" - $files = $xml.SelectSingleNode("/package/files") - $iconFile = $xml.CreateElement("file") - $iconFile.SetAttribute("src", "$nugetIconFile") - $iconFile.SetAttribute("target", "images\") - $files.AppendChild($iconFile) | Out-Null - - $iconElement = $xml.CreateElement("icon") - $iconElement.InnerText = "images\$nugetIconFile" - $xml.package.metadata.AppendChild($iconElement) | Out-Null - } - $xml.Save($Path) -} - -function Update-Versions { - param ( - [string]$Path - ) - $Path = Resolve-Path $Path - [xml] $xml = Get-Content $Path - - foreach ($dependency in $xml.package.metadata.dependencies.group.dependency) { - if ($dependency.id -eq "MaterialDesignColors") { - $dependency.version = $MDIXColorsVersion - } - elseif ($dependency.id -eq "MaterialDesignThemes") { - $dependency.version = $MDIXVersion - } - } - $xml.Save($Path) -} - -function New-Nuget { - param ( - [string]$NuSpecPath, + [string]$ProjectPath, [string]$Version ) - $NuSpecPath = Resolve-Path $NuSpecPath - Update-Icon "$NuSpecPath" - nuget pack "$NuSpecPath" -version "$Version" -Properties "Configuration=$configuration;Copyright=$copyright" + $ProjectPath = Resolve-Path $ProjectPath + Write-Host "Packing $ProjectPath with version $Version" + dotnet pack "$ProjectPath" -c $configuration -p:PackageVersion="$Version" -p:Copyright="$copyright" --no-build -o "." } Push-Location "$(Join-Path $PSScriptRoot "..")" -Update-Versions .\src\MaterialDesignColors.Wpf\MaterialDesignColors.nuspec -Update-Versions .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.nuspec -Update-Versions .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.nuspec - -New-Nuget .\src\MaterialDesignColors.Wpf\MaterialDesignColors.nuspec $MDIXColorsVersion -New-Nuget .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.nuspec $MDIXVersion -New-Nuget .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.nuspec $MDIXMahAppsVersion +# Pack the projects +New-DotNetPackage .\src\MaterialDesignColors.Wpf\MaterialDesignColors.Wpf.csproj $MDIXColorsVersion +New-DotNetPackage .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.Wpf.csproj $MDIXVersion +New-DotNetPackage .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.csproj $MDIXMahAppsVersion Pop-Location diff --git a/build/MaterialDesign.Icon.png b/build/MaterialDesign.Icon.png new file mode 100644 index 0000000000..6050e05cf7 Binary files /dev/null and b/build/MaterialDesign.Icon.png differ diff --git a/build/azure-pipelines-wiki.yml b/build/azure-pipelines-wiki.yml deleted file mode 100644 index 3f98fae578..0000000000 --- a/build/azure-pipelines-wiki.yml +++ /dev/null @@ -1,24 +0,0 @@ -trigger: none - -pr: none - -pool: - vmImage: "VS2017-Win2016" - -steps: - - task: PowerShell@2 - inputs: - filePath: 'build\\GenerateThemesWikiMarkdown.ps1' - - - task: WikiUpdaterTask@1 - inputs: - repo: "github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit.wiki.git" - filename: "ControlStyleList.md" - dataIsFile: true - sourceFile: 'build\\ControlStyleList.md' - message: "Automatic update of ControlStyleList.md from Azure pipeline" - gitname: "Azure Dev Ops" - gitemail: "azure@materialdesigninxaml.net" - user: "$(GitHubUser)" - password: "$(GitHubPat)" - localpath: '$(System.DefaultWorkingDirectory)\\Scripts\\Wiki' diff --git a/src/MainDemo.Wpf/Domain/MainWindowViewModel.cs b/src/MainDemo.Wpf/Domain/MainWindowViewModel.cs index 12e4238fc8..feb1fef7cf 100644 --- a/src/MainDemo.Wpf/Domain/MainWindowViewModel.cs +++ b/src/MainDemo.Wpf/Domain/MainWindowViewModel.cs @@ -450,6 +450,14 @@ private static IEnumerable GenerateDemoItems(ISnackbarMessageQueue sna DocumentationLink.ApiLink(), DocumentationLink.ApiLink() ]); + + yield return new DemoItem( + "ToolTips", + typeof(ToolTips), + [ + DocumentationLink.DemoPageLink(), + DocumentationLink.DemoPageLink("Demo View Model", "Domain"), + ]); } private bool DemoItemsFilter(object obj) diff --git a/src/MainDemo.Wpf/Domain/TabsViewModel.cs b/src/MainDemo.Wpf/Domain/TabsViewModel.cs index 08c32cc99b..26b1ad234a 100644 --- a/src/MainDemo.Wpf/Domain/TabsViewModel.cs +++ b/src/MainDemo.Wpf/Domain/TabsViewModel.cs @@ -4,10 +4,10 @@ namespace MaterialDesignDemo.Domain; -internal class TabsViewModel : ViewModelBase +internal partial class TabsViewModel : ObservableObject { public ObservableCollection CustomTabs { get; } - + public List LongList { get; } public CustomTab? SelectedTab { get; set; } public string? VeryLongText { get; set; } = @" @@ -47,6 +47,8 @@ public TabsViewModel() CustomContent = "Custom content 3", }, }; + + LongList = Enumerable.Range(1, 20).ToList(); } } diff --git a/src/MainDemo.Wpf/Fields.xaml b/src/MainDemo.Wpf/Fields.xaml index 432e141ac0..ceaf16e74a 100644 --- a/src/MainDemo.Wpf/Fields.xaml +++ b/src/MainDemo.Wpf/Fields.xaml @@ -19,6 +19,7 @@ 200 0,0,8,0 + - + @@ -524,6 +526,7 @@ Margin="0 0 0 8" /> diff --git a/src/MainDemo.Wpf/Tabs.xaml b/src/MainDemo.Wpf/Tabs.xaml index 60252e2997..b575c717ae 100644 --- a/src/MainDemo.Wpf/Tabs.xaml +++ b/src/MainDemo.Wpf/Tabs.xaml @@ -755,5 +755,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MainDemo.Wpf/ToolTips.xaml b/src/MainDemo.Wpf/ToolTips.xaml new file mode 100644 index 0000000000..df0cbf315b --- /dev/null +++ b/src/MainDemo.Wpf/ToolTips.xaml @@ -0,0 +1,167 @@ + + + + + + + + 0,16,0,0 + + + + + + + + +