mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
40 lines
2.2 KiB
Plaintext
40 lines
2.2 KiB
Plaintext
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:AIStudio.Wpf.Mind.Controls">
|
||
|
|
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Styles/Button.xaml"/>
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
|
||
|
|
<Style x:Key="OpenFileTextBoxStyle" TargetType="{x:Type controls:OpenFileTextBox}">
|
||
|
|
<Setter Property="BorderThickness" Value="1" />
|
||
|
|
<Setter Property="BorderBrush" Value="Gray" />
|
||
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type controls:OpenFileTextBox}">
|
||
|
|
<Grid x:Name="RootGrid">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Border x:Name="Bg"
|
||
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||
|
|
Background="{TemplateBinding Background}"
|
||
|
|
Grid.ColumnSpan="2"/>
|
||
|
|
|
||
|
|
<!--内容区域-->
|
||
|
|
<ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" IsTabStop="False" Margin="2"
|
||
|
|
VerticalAlignment="Stretch" Background="{x:Null}" />
|
||
|
|
<Button x:Name="PART_OpenButton" Grid.Column="1" Content="打开" Padding="6,0" Style="{StaticResource FlatButtonStyle}" />
|
||
|
|
</Grid>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style TargetType="{x:Type controls:OpenFileTextBox}" BasedOn="{StaticResource OpenFileTextBoxStyle}" />
|
||
|
|
|
||
|
|
</ResourceDictionary>
|