Repository navigation
Redesign XamlSamples with the gallery design system and add .NET 11 XAML pages - #798
Open
jfversluis wants to merge 3 commits into
Open
jfversluis wants to merge 3 commits into
jfversluis wants to merge 3 commits into
Conversation
…AML pages - Copy the gallery design system (colors, styles, Inter and Material Icons fonts) into the sample. - Give every tutorial page a header and card through an implicit ContentPage style and control template (Resources/Styles/DemoPage.xaml), so the page XAML stays what the XAML fundamentals tutorial teaches. - Replace Shell with NavigationPage and redesign the home page, grouped by tutorial part. - Make small tutorial-page edits: colors that work in light and dark themes, an AppConstants class to match the tutorial's x:Static example, and spacing fixes for rotated content. - Add a "New in .NET 11" section: implicit XAML namespaces, C# expressions in XAML, compiled RelativeSource ancestor bindings, and ConverterCulture. - Fix bold text on iOS with the Inter font, and bundle Fluent Emoji (MIT) for the grocery list. - Update the README with light and dark screenshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoids CsWinRT1032 warnings in the Windows build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The ⇦ glyph isn't in Inter, and the fallback font drew a thin outline arrow that looked disabled. ← (U+2190) is in Inter. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
jfversluis
added a commit
to dotnet/docs-maui
that referenced
this pull request
Nov 28, 2026
The redesigned sample uses U+2190 for the backspace button because the Inter font has no U+21E6 glyph (dotnet/maui-samples#798, 63b14608). Split the KeypadPage excerpt by version and replace keypad-net11.png with the recapture. Earlier versions keep U+21E6. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
davidortinau
pushed a commit
to dotnet/docs-maui
that referenced
this pull request
Dec 1, 2026
…ned XamlSamples sample (#3645) * XAML fundamentals (.NET 11): use CollectionView in data binding basics The 11.0 XamlSamples sample uses CollectionViewDemoPage, and ListView is deprecated in .NET 10. Add a .NET 11 version of the bindings and collections section that uses CollectionView with DataTemplate content instead of ListView and ViewCell. Earlier versions keep ListView, which matches the 10.0 sample. Also fix a typo (dsplays). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * XAML fundamentals (.NET 11): screenshots and excerpts for redesigned XamlSamples Add .NET 11 versions of 14 tutorial screenshots (*-net11.png) from the redesigned XamlSamples sample behind >=net-maui-11.0. Earlier versions keep the original screenshots. new-solution.png isn't from the sample and is unchanged. Split the tutorial page excerpts that changed with the redesign: HelloXamlPage (MediumSlateBlue), GridDemoPage colors, SharedResourcesPage OnPlatform colors and spacing, StaticConstantsPage AppConstants values and BoxView margin, SliderBindingsPage spacing, and SliderTransformsPage (no page padding, label spans both columns, as in the sample). For all versions, the slider transforms text now names the Rotation, RotationX, and RotationY properties. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * XAML fundamentals: address review feedback Make the .NET 11 styling note specific, say that the shared resources screenshot is from Android, explain SelectionMode in the CollectionView example, and refer to VerticalStackLayout in the MVVM prose to match the code (all versions). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * XAML fundamentals: fix page structure and versioned guidance - get-started: move the explanation of the Hello XAML example back under it, promote the .NET 11 implicit namespace section out of the preview section and point the earlier note at it, and say that XAML source generation is the default in .NET 11. - data-binding-basics: note that ListView is deprecated in .NET 10. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * MVVM (.NET 11): use the left arrow glyph in the keypad excerpt The redesigned sample uses U+2190 for the backspace button because the Inter font has no U+21E6 glyph (dotnet/maui-samples#798, 63b14608). Split the KeypadPage excerpt by version and replace keypad-net11.png with the recapture. Earlier versions keep U+21E6. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
63b1460896eb6cb1a90ae39752355708e26d1473↑ CI passed on macos-26 and windows-latest for this head, with no warnings for this sample.
↑ All 18 pages captured in light and dark on an iPhone 18 Pro simulator (iOS 27.2) and a physical Pixel 10.
↑ Pixel 10 real-touch checks of navigation, sliders, buttons, entries, the keypad (including the new backspace glyph), the docs link, and all four .NET 11 pages.
↑ GPT and Sonnet code reviews and a Gemini design review; findings addressed.
↓ iOS interactions driven through code rather than touch.
↓ Windows and Mac Catalyst built in CI but not run.
↓ On a phone in landscape, the HSL page's last slider is cut off, because the tutorial's layout doesn't scroll.
Redesigns
11.0/XAML/Fundamentals(XamlSamples) with the shared gallery design system used by ControlGallery, PlatformIntegrationDemos (#792), CollectionViewDemos (#793), and DataBindingDemos (#796), and adds pages for XAML features that are new in .NET 11.This sample backs the XAML fundamentals tutorial, and readers type along with it, so the tutorial pages keep the XAML the tutorial teaches. The styling lives in resource dictionaries instead of page markup.
What changed
ContentPagestyle inResources/Styles/DemoPage.xamlgives every page a control template. The template adds a header (part of the tutorial, title, a short explanation, and a "Read the tutorial" link) and a card around the page's content. On short windows, such as a phone in landscape, the header is hidden. ImplicitStackLayout,VerticalStackLayout,Grid, andButtonstyles add the spacing and theme colors that the tutorial's XAML doesn't set.NavigationPagereplaces the single-pageShell.Labelstyle also gains a trigger that switches toInterBoldforFontAttributes="Bold", because iOS doesn't synthesize bold for a custom font. Without it, the tutorial's bold text rendered regular on iOS. The other gallery samples have the same issue.New in .NET 11
A new section on the home page has four pages. They use implicit XAML namespaces (no
xmlnsdeclarations).GlobalXmlns.csadds the app's namespace to the global XAML namespace.EnablePreviewFeaturesneededGT/GTE, event lambdasRelativeSource AncestorTypebindings (dotnet/maui#34408, dotnet/maui#36905)Binding.ConverterCulture(dotnet/maui#35821)x:Code(dotnet/maui#34715)EnablePreviewFeaturesInvalidateStyle/InvalidateVisualStatesUserInterface/Styles/InvalidateStyleDemo)Tutorial page changes, and why
Per the docs plan, the tutorial will add .NET 11 code for these pages.
TextColor="Blue"becomesMediumSlateBlue, which is readable on light and dark cards. The page now matches the tutorial snippet otherwise: noContentPage.Contentwrapper orIsVisible, andFontSize="18".Grid.Row="0"andGrid.Column="0"are removed, as in the tutorial.OnPlatformtext colors are IndianRed (iOS and Mac Catalyst), SeaGreen (Android), and SteelBlue (Windows), so they're readable on the buttons in both themes.Spacing="40"keeps the rotated buttons from overlapping.AppConstantsclass throughx:Static, which is what the tutorial shows; the sample used literal colors before. The colors are lavender on .NET violet.Margin="0,150"reserves room for the BoxView scaled 100 times, which otherwise covered the label. The pagePaddingis removed.Spacing="48"lets the rotating label clear the slider. The page now matches the tutorial otherwise.Paddingand slider margins are removed. The card provides the padding.⇦(⇦) to←(←). Inter doesn't include ⇦, and the fallback font drew a thin outline arrow that looked disabled. Nothing else changes.VerticalStackLayout,xmlns:local).Screenshots
The screenshots follow your GitHub theme. Pages: home, Hello XAML, Grid, shared resources, static constants, and keypad.
iOS (iPhone 18 Pro simulator), before and after:
Android (Pixel 10), before and after:
The new .NET 11 pages:
Validation
IsEnabled/IsVisibleexpressions