feat: make titlebar visible property actually useful.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type u:UrsaView}" TargetType="{x:Type u:UrsaView}">
|
||||
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
|
||||
@@ -20,12 +21,25 @@
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Grid ColumnDefinitions="Auto, *, Auto"
|
||||
<Grid
|
||||
Margin="{Binding $parent[u:UrsaWindow].TitleBarMargin}"
|
||||
VerticalAlignment="Top"
|
||||
Margin="{Binding $parent[u:UrsaWindow].TitleBarMargin}">
|
||||
<ContentPresenter Grid.Column="0" Content="{TemplateBinding LeftContent}" VerticalAlignment="Center"/>
|
||||
<ContentPresenter Grid.Column="1" Content="{TemplateBinding TitleBarContent}" VerticalAlignment="Center"/>
|
||||
<ContentPresenter Grid.Column="2" Content="{TemplateBinding RightContent}" VerticalAlignment="Center"/>
|
||||
ColumnDefinitions="Auto, *, Auto">
|
||||
<ContentPresenter
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleBarVisible}"
|
||||
Content="{TemplateBinding LeftContent}" />
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleBarVisible}"
|
||||
Content="{TemplateBinding TitleBarContent}" />
|
||||
<ContentPresenter
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleBarVisible}"
|
||||
Content="{TemplateBinding RightContent}" />
|
||||
</Grid>
|
||||
<u:OverlayDialogHost IsModalStatusReporter="True" />
|
||||
</Panel>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
<VisualLayerManager Padding="{TemplateBinding OffScreenMargin, Mode=OneWay}">
|
||||
<VisualLayerManager.ChromeOverlayLayer>
|
||||
<u:TitleBar
|
||||
IsTitleVisible="{TemplateBinding IsTitleBarVisible}"
|
||||
Content="{Binding $parent[u:UrsaWindow].TitleBarContent}"
|
||||
Margin="{Binding $parent[u:UrsaWindow].TitleBarMargin}"
|
||||
LeftContent="{Binding $parent[u:UrsaWindow].LeftContent}"
|
||||
@@ -97,14 +98,17 @@
|
||||
<ContentPresenter
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleVisible}"
|
||||
Content="{TemplateBinding LeftContent}" />
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleVisible}"
|
||||
Content="{TemplateBinding Content}" />
|
||||
<ContentPresenter
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{TemplateBinding IsTitleVisible}"
|
||||
Content="{TemplateBinding RightContent}" />
|
||||
<u:CaptionButtons
|
||||
x:Name="PART_CaptionButtons"
|
||||
|
||||
Reference in New Issue
Block a user