Skip to content

Commit 4de729e

Browse files
wnvko-msftCopilot
andauthored
Fixes text/content truncation on several Layout sample pages when viewed at reflow dimensions (400% zoom / narrow window / portrait orientation) (#782)
* Fix text truncation on Grid page at reflow dimensions (WCAG 1.4.10) * Fix text truncation on Border page at reflow dimensions (WCAG 1.4.10) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Submit button truncation on GroupBox page at reflow dimensions (WCAG 1.4.10) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix text truncation on ResizeGrip page at portrait dimensions (WCAG 1.4.10) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dee71cd commit 4de729e

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

Sample Applications/WPFGallery/Views/Layout/BorderPage.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
2020
mc:Ignorable="d">
2121

22+
<Page.Resources>
23+
<Style TargetType="TextBlock">
24+
<Setter Property="TextWrapping" Value="Wrap"/>
25+
</Style>
26+
</Page.Resources>
27+
2228
<Grid x:Name="ContentPagePane" Height="Auto">
2329

2430
<Grid.RowDefinitions>

Sample Applications/WPFGallery/Views/Layout/GridPage.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
Title="GridPage"
1111
Foreground="{DynamicResource TextFillColorPrimaryBrush}">
1212

13+
<Page.Resources>
14+
<Style TargetType="TextBlock">
15+
<Setter Property="TextWrapping" Value="Wrap"/>
16+
</Style>
17+
</Page.Resources>
18+
1319
<Grid x:Name="ContentPagePane" Height="Auto">
1420

1521
<Grid.RowDefinitions>

Sample Applications/WPFGallery/Views/Layout/GroupBoxPage.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Header=&quot;User Information&quot; &#10;
2727
HorizontalAlignment=&quot;Left&quot; &#10;
2828
VerticalAlignment=&quot;Center&quot; &#10;
29-
Width=&quot;400&quot;&gt;&#10;
29+
MaxWidth=&quot;400&quot;&gt;&#10;
3030
&lt;StackPanel&gt;&#10;
3131
&lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;&#10;
3232
&lt;TextBlock Width=&quot;100&quot; Text=&quot;Name:&quot; /&gt;&#10;
@@ -42,7 +42,7 @@
4242
Header="User Information"
4343
HorizontalAlignment="Left"
4444
VerticalAlignment="Center"
45-
Width="400">
45+
MaxWidth="400">
4646
<StackPanel>
4747
<StackPanel Orientation="Horizontal">
4848
<TextBlock Width="100" Text="Name:" />

Sample Applications/WPFGallery/Views/Layout/ResizeGripPage.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
Title="ResizeGripPage"
1111
Foreground="{DynamicResource TextFillColorPrimaryBrush}">
1212

13+
<Page.Resources>
14+
<Style TargetType="TextBlock">
15+
<Setter Property="TextWrapping" Value="Wrap"/>
16+
</Style>
17+
</Page.Resources>
18+
1319
<Grid>
1420
<Grid x:Name="ContentPagePane" Height="Auto">
1521
<Grid.RowDefinitions>

0 commit comments

Comments
 (0)