Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
place bar above title, add tooltips
  • Loading branch information
Jay-o-Way committed Dec 11, 2024
1 parent 4505036 commit 71a30dd
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions WinUIGallery/Controls/PageHeader.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
AutomationProperties.AutomationId="PageHeader"
Style="{StaticResource TitleTextBlockStyle}"
Text="{x:Bind Item.Title}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />

<CommandBar Grid.Row="1" DefaultLabelPosition="Right">

<CommandBar Grid.Row="0" DefaultLabelPosition="Right" HorizontalAlignment="Right">
<AppBarButton x:Name="APIDetailsBtn" Label="About API">
<AppBarButton.Icon>
<FontIcon Glyph="&#xE946;" />
Expand Down Expand Up @@ -106,7 +99,8 @@
Glyph="&#xE946;"
ToolTipService.ToolTip="Source code of this control in the WinUI repository. For some controls only the XAML file is available" />
</StackPanel>
<HyperlinkButton x:Name="ControlSourceLink" Content="{x:Bind Item.Title}" />
<HyperlinkButton x:Name="ControlSourceLink" Content="{x:Bind Item.Title}"
ToolTipService.ToolTip="{x:Bind ControlSourceLink.NavigateUri}"/>
</StackPanel>

<MenuFlyoutSeparator Margin="0,8" />
Expand All @@ -128,11 +122,11 @@
<HyperlinkButton
x:Name="PageMarkupGitHubLink"
Content="XAML"
ToolTipService.ToolTip="" />
ToolTipService.ToolTip="{x:Bind PageMarkupGitHubLink.NavigateUri}" />
<HyperlinkButton
x:Name="PageCodeGitHubLink"
Content="C#"
ToolTipService.ToolTip="" />
ToolTipService.ToolTip="{x:Bind PageCodeGitHubLink.NavigateUri}" />
</StackPanel>
</Flyout>
</AppBarButton.Flyout>
Expand Down Expand Up @@ -199,5 +193,14 @@
</AppBarButton>
</CommandBar.SecondaryCommands>
</CommandBar>

<TextBlock
Grid.Row="1"
AutomationProperties.AutomationId="PageHeader"
Style="{StaticResource TitleTextBlockStyle}"
Text="{x:Bind Item.Title}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />

</Grid>
</UserControl>

0 comments on commit 71a30dd

Please sign in to comment.