Skip to content

Add InvalidateStyle demo sample for .NET MAUI 11#753

Merged
jfversluis merged 7 commits into
mainfrom
sample-invalidate-style
Apr 14, 2026
Merged

Add InvalidateStyle demo sample for .NET MAUI 11#753
jfversluis merged 7 commits into
mainfrom
sample-invalidate-style

Conversation

@davidortinau

Copy link
Copy Markdown
Contributor

Summary

Standalone sample demonstrating InvalidateStyle() and VisualStateManager.InvalidateVisualStates() — new APIs in .NET MAUI 11 (dotnet/maui#34723).

APIs demonstrated

  • In-place Setter.Value mutation + InvalidateStyle() to reapply
  • VisualState setter mutation + InvalidateVisualStates() to reapply
  • Both patterns in a single-page demo

Files

  • 11.0/UserInterface/Styles/InvalidateStyleDemo/ — complete standalone project
  • Includes docregion markers for snippet extraction
  • README with API reference

Companion to docs-maui#3282 (whats-new + InvalidateStyle docs).

davidortinau and others added 5 commits April 10, 2026 15:49
Demonstrates two new .NET MAUI 11 Preview 3 APIs (dotnet/maui#34723):
- StyleableElement.InvalidateStyle() for reapplying mutated styles
- VisualStateManager.InvalidateVisualStates() for reapplying visual states

Includes docregion markers for snippet extraction.

Co-authored-by: Copilot <[email protected]>
- Bump SupportedOSPlatformVersion: Android 21→23, iOS 15→17, Mac Catalyst 15→17
- Add missing Platforms/ folder with entry points (iOS, Mac Catalyst, Android)

Co-authored-by: Copilot <[email protected]>
Replace hardcoded logging package version with $(DotNetVersion).

Co-authored-by: Copilot <[email protected]>
jfversluis and others added 2 commits April 14, 2026 22:58
Fixes CS5001 build error on Windows by adding the required
Platforms/Windows/ files (App.xaml, App.xaml.cs, Package.appxmanifest,
app.manifest).

Co-authored-by: Copilot <[email protected]>
@jfversluis jfversluis merged commit 02760f5 into main Apr 14, 2026
3 checks passed
@jfversluis jfversluis deleted the sample-invalidate-style branch April 14, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants