|
@@ -3,36 +3,51 @@
|
|
xmlns:controls="clr-namespace:PixiDocks.Avalonia.Controls"
|
|
xmlns:controls="clr-namespace:PixiDocks.Avalonia.Controls"
|
|
xmlns:docking="clr-namespace:PixiDocks.Core.Docking;assembly=PixiDocks.Core"
|
|
xmlns:docking="clr-namespace:PixiDocks.Core.Docking;assembly=PixiDocks.Core"
|
|
xmlns:dock="clr-namespace:PixiEditor.ViewModels.Dock"
|
|
xmlns:dock="clr-namespace:PixiEditor.ViewModels.Dock"
|
|
- xmlns:helpers="clr-namespace:PixiDocks.Avalonia.Helpers;assembly=PixiDocks.Avalonia">
|
|
|
|
|
|
+ xmlns:helpers="clr-namespace:PixiDocks.Avalonia.Helpers;assembly=PixiDocks.Avalonia"
|
|
|
|
+ xmlns:converters="clr-namespace:PixiDocks.Avalonia.Converters;assembly=PixiDocks.Avalonia">
|
|
|
|
|
|
- <DataTemplate DataType="dock:DocumentTabCustomizationSettings" x:Key="{x:Type dock:DocumentTabCustomizationSettings}">
|
|
|
|
|
|
+ <DataTemplate DataType="dock:DocumentTabCustomizationSettings"
|
|
|
|
+ x:Key="{x:Type dock:DocumentTabCustomizationSettings}">
|
|
<Grid Margin="5, 0">
|
|
<Grid Margin="5, 0">
|
|
<Grid.Resources>
|
|
<Grid.Resources>
|
|
- <helpers:ConditionToSizeConverter x:Key="ConditionToSizeConverter"/>
|
|
|
|
|
|
+ <helpers:ConditionToSizeConverter x:Key="ConditionToSizeConverter" />
|
|
|
|
+ <converters:ValidImageIconConverter x:Key="ValidIconConverter" />
|
|
|
|
+ <converters:SourceToImageConverter x:Key="SourceToImageConverter" />
|
|
|
|
+ <converters:ControlIconConverter x:Key="ControlIconConverter" />
|
|
</Grid.Resources>
|
|
</Grid.Resources>
|
|
<Grid.ColumnDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
- <ColumnDefinition Width="{Binding Icon,
|
|
|
|
- Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=20}"/>
|
|
|
|
- <ColumnDefinition Width="*"/>
|
|
|
|
- <ColumnDefinition Width="{Binding !IsSaved,
|
|
|
|
- Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=8}"/>
|
|
|
|
- <ColumnDefinition Width="{Binding ShowCloseButton,
|
|
|
|
- Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=20}"/>
|
|
|
|
|
|
+ <ColumnDefinition
|
|
|
|
+ Width="{Binding Icon,
|
|
|
|
+ Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=20}" />
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ <ColumnDefinition
|
|
|
|
+ Width="{Binding !IsSaved,
|
|
|
|
+ Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=8}" />
|
|
|
|
+ <ColumnDefinition
|
|
|
|
+ Width="{Binding ShowCloseButton,
|
|
|
|
+ Converter={StaticResource ConditionToSizeConverter}, ConverterParameter=20}" />
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <Image IsVisible="{Binding !!Icon}" Source="{Binding Icon}"
|
|
|
|
|
|
+ <Image IsVisible="{Binding Icon, Converter={StaticResource ValidIconConverter}}"
|
|
|
|
+ Source="{Binding Icon, Converter={StaticResource SourceToImageConverter}}"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
RenderOptions.BitmapInterpolationMode="None"
|
|
RenderOptions.BitmapInterpolationMode="None"
|
|
- DockPanel.Dock="Left" Width="16" Height="16"/>
|
|
|
|
- <TextBlock Grid.Column="1" Padding="5" DockPanel.Dock="Left" Foreground="{DynamicResource ThemeForegroundBrush}"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
- Text="{Binding $parent[ContentControl].Tag.Title, FallbackValue=TITLE}"/>
|
|
|
|
- <Ellipse Grid.Column="2" Width="5" Height="5" Fill="White" IsVisible="{Binding !IsSaved}"/>
|
|
|
|
- <Button Grid.Column="3" Classes="CloseTabButton"
|
|
|
|
- Height="16" Width="16" Margin="5, 0, 0, 0"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
- Command="{Binding $parent[ContentControl].Tag.CloseDockable}"
|
|
|
|
- IsVisible="{Binding ShowCloseButton}"
|
|
|
|
- IsEnabled="{Binding $parent[ContentControl].Tag.CanClose}"/>
|
|
|
|
|
|
+ DockPanel.Dock="Left" Width="16" Height="16" />
|
|
|
|
+ <ContentPresenter
|
|
|
|
+ Grid.Column="0" VerticalAlignment="Center"
|
|
|
|
+ DockPanel.Dock="Left" Width="16" Height="16"
|
|
|
|
+ Content="{Binding Icon}"
|
|
|
|
+ IsVisible="{Binding Icon, Converter={StaticResource ControlIconConverter}}"/>
|
|
|
|
+ <TextBlock Grid.Column="1" Padding="5" DockPanel.Dock="Left"
|
|
|
|
+ Foreground="{DynamicResource ThemeForegroundBrush}"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Text="{Binding $parent[ContentControl].Tag.Title, FallbackValue=TITLE}" />
|
|
|
|
+ <Ellipse Grid.Column="2" Width="5" Height="5" Fill="White" IsVisible="{Binding !IsSaved}" />
|
|
|
|
+ <Button Grid.Column="3" Classes="CloseTabButton"
|
|
|
|
+ Height="16" Width="16" Margin="5, 0, 0, 0"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Command="{Binding $parent[ContentControl].Tag.CloseDockable}"
|
|
|
|
+ IsVisible="{Binding ShowCloseButton}"
|
|
|
|
+ IsEnabled="{Binding $parent[ContentControl].Tag.CanClose}" />
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary>
|