-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with HorizontalContentAlignment not working on NavigationView…
…Item (#1325) * Fix bug with NavViewItem HorizontalContentAlignment , Closes #481 * Improve visual behaviour * Add testpage für NavView Menuitem content stretch
- Loading branch information
Showing
6 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
dev/NavigationView/TestUI/NavigationViewMenuItemStretchPage.xaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. --> | ||
<local:TestPage | ||
x:Class="MUXControlsTestApp.NavigationViewMenuItemStretchPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:MUXControlsTestApp" | ||
xmlns:muxcontrols="using:Microsoft.UI.Xaml.Controls" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<!-- This page contains a NavigationView control that is in LeftMinimal mode on initial load --> | ||
<StackPanel> | ||
<muxcontrols:NavigationView > | ||
<muxcontrols:NavigationView.MenuItems> | ||
<muxcontrols:NavigationViewItem HorizontalContentAlignment="Center" Icon="Find" Tag="find" IsSelected="True"> | ||
<Border Background="Red"> | ||
<TextBlock>Center</TextBlock> | ||
</Border> | ||
</muxcontrols:NavigationViewItem> | ||
<muxcontrols:NavigationViewItem HorizontalContentAlignment="Left" Icon="Find" Tag="find" IsSelected="True"> | ||
<Border Background="Red"> | ||
<TextBlock>Left</TextBlock> | ||
</Border> | ||
</muxcontrols:NavigationViewItem> | ||
<muxcontrols:NavigationViewItem HorizontalContentAlignment="Right" Icon="Find" Tag="find" IsSelected="True"> | ||
<Border Background="Red"> | ||
<TextBlock>Right</TextBlock> | ||
</Border> | ||
</muxcontrols:NavigationViewItem> | ||
<muxcontrols:NavigationViewItem HorizontalContentAlignment="Stretch" Icon="Find" Tag="find" IsSelected="True"> | ||
<Border Background="Red"> | ||
<TextBlock>Stretch</TextBlock> | ||
</Border> | ||
</muxcontrols:NavigationViewItem> | ||
|
||
</muxcontrols:NavigationView.MenuItems> | ||
</muxcontrols:NavigationView> | ||
</StackPanel> | ||
</local:TestPage> |
13 changes: 13 additions & 0 deletions
13
dev/NavigationView/TestUI/NavigationViewMenuItemStretchPage.xaml.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace MUXControlsTestApp | ||
{ | ||
public sealed partial class NavigationViewMenuItemStretchPage : TestPage | ||
{ | ||
public NavigationViewMenuItemStretchPage() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains 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