From 8e9872335a388f25ce6d805b36e8aef643738f1b Mon Sep 17 00:00:00 2001 From: Jay <65828559+Jay-o-Way@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:40:40 +0100 Subject: [PATCH] Adjust padding on control sample codes to prevent code occlusion through scrollbars (#1490) ## Description Remove padding of UserControl and Grid, and set (bottom)margin on ContentPresenter. ## Motivation and Context fixes #1489, ~1501~ ## How Has This Been Tested? ## Screenshots (if appropriate): ![image](https://github.com/microsoft/WinUI-Gallery/assets/65828559/d6aa1fed-1117-415d-8bb1-d8c7bd55bd46) ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) P.S. It's **Styler** that moved the **VisualStateManager** bits around --- WinUIGallery/Controls/ControlExample.xaml | 99 ++++++++++--------- .../Controls/SampleCodePresenter.xaml | 39 ++++---- 2 files changed, 70 insertions(+), 68 deletions(-) diff --git a/WinUIGallery/Controls/ControlExample.xaml b/WinUIGallery/Controls/ControlExample.xaml index 365f3d290..81cfa822b 100644 --- a/WinUIGallery/Controls/ControlExample.xaml +++ b/WinUIGallery/Controls/ControlExample.xaml @@ -4,9 +4,10 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:contract7Present="using:Microsoft.UI.Xaml.Controls?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:controls="using:WinUIGallery.Controls" + xmlns:controls1="using:WinUIGallery.DesktopWap.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:controls1="using:WinUIGallery.DesktopWap.Controls" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" x:Name="RootPanel" Margin="0,16,0,0" d:DesignHeight="250" @@ -40,56 +41,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + CornerRadius="8,8,0,0" + Style="{ThemeResource GalleryTileGridStyle}"> @@ -191,7 +148,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WinUIGallery/Controls/SampleCodePresenter.xaml b/WinUIGallery/Controls/SampleCodePresenter.xaml index f840ad200..37b7a0db4 100644 --- a/WinUIGallery/Controls/SampleCodePresenter.xaml +++ b/WinUIGallery/Controls/SampleCodePresenter.xaml @@ -5,14 +5,12 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="using:WinUIGallery.DesktopWap.Controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - Padding="0,4,0,4" VerticalContentAlignment="Top" ActualThemeChanged="SampleCodePresenter_ActualThemeChanged" Loaded="SampleCodePresenter_Loaded" mc:Ignorable="d"> + + + + + @@ -50,22 +68,5 @@ - - - - -