110 lines
4.6 KiB
XML
110 lines
4.6 KiB
XML
<UserControl
|
|
x:Class="Wino.Controls.Advanced.WinoAppTitleBar"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:advanced="using:Wino.Controls.Advanced"
|
|
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
|
|
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="using:Wino.Controls.Advanced"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
d:DesignHeight="300"
|
|
d:DesignWidth="400"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid x:Name="MainGrid" Background="{ThemeResource AppBarBackgroundColor}">
|
|
<Grid
|
|
x:Name="dragbar"
|
|
Background="Transparent"
|
|
IsHitTestVisible="True" />
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="FluentButtonWidth" Width="Auto" />
|
|
<ColumnDefinition x:Name="EmptySpaceWidth" Width="*" />
|
|
<ColumnDefinition x:Name="SystemReservedWidth" Width="180" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Shell Title Bar Left Side Background Placeholder -->
|
|
<Grid Grid.ColumnSpan="3" />
|
|
|
|
<!-- Menu + Back Button -->
|
|
<StackPanel
|
|
x:Name="LeftMenuStackPanel"
|
|
Orientation="Horizontal"
|
|
SizeChanged="asd">
|
|
<Button
|
|
x:Name="PaneButton"
|
|
Width="48"
|
|
Margin="-2,-2,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
Click="PaneClicked">
|
|
<muxc:AnimatedIcon Width="16">
|
|
<muxc:AnimatedIcon.Source>
|
|
<animatedvisuals:AnimatedGlobalNavigationButtonVisualSource />
|
|
</muxc:AnimatedIcon.Source>
|
|
<muxc:AnimatedIcon.FallbackIconSource>
|
|
<muxc:SymbolIconSource Symbol="GlobalNavigationButton" />
|
|
</muxc:AnimatedIcon.FallbackIconSource>
|
|
</muxc:AnimatedIcon>
|
|
</Button>
|
|
<Button
|
|
x:Name="BackButton"
|
|
Width="48"
|
|
Margin="-2,4,4,4"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
Click="BackClicked"
|
|
Visibility="{x:Bind IsBackButtonVisible, Mode=OneWay}">
|
|
<muxc:AnimatedIcon Width="16">
|
|
<muxc:AnimatedIcon.Source>
|
|
<animatedvisuals:AnimatedBackVisualSource />
|
|
</muxc:AnimatedIcon.Source>
|
|
<muxc:AnimatedIcon.FallbackIconSource>
|
|
<muxc:SymbolIconSource Symbol="Back" />
|
|
</muxc:AnimatedIcon.FallbackIconSource>
|
|
</muxc:AnimatedIcon>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<!-- CoreWindow Title -->
|
|
<TextBlock
|
|
x:Name="CoreWindowTitleTextBlock"
|
|
Grid.Column="1"
|
|
Margin="4,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
HorizontalTextAlignment="Center"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{x:Bind CoreWindowText, Mode=OneWay}"
|
|
TextTrimming="Clip">
|
|
<animations:Implicit.ShowAnimations>
|
|
<animations:OpacityAnimation
|
|
From="0"
|
|
To="1.0"
|
|
Duration="0:0:1" />
|
|
</animations:Implicit.ShowAnimations>
|
|
</TextBlock>
|
|
|
|
<!-- Shell Sub Content -->
|
|
<ContentPresenter
|
|
x:Name="ShellContentContainer"
|
|
Grid.Column="1"
|
|
Canvas.ZIndex="2"
|
|
Content="{x:Bind ShellFrameContent, Mode=OneWay}">
|
|
<ContentPresenter.ContentTransitions>
|
|
<TransitionCollection>
|
|
<PaneThemeTransition Edge="Top" />
|
|
</TransitionCollection>
|
|
</ContentPresenter.ContentTransitions>
|
|
</ContentPresenter>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|