122 lines
5.7 KiB
XML
122 lines
5.7 KiB
XML
<Page
|
|
x:Class="RookieStation.CommonTools.View.WpfFamilyDockablePane"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:local="clr-namespace:RookieStation"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
Width="216"
|
|
Height="540"
|
|
MinWidth="200"
|
|
Background="LightGray"
|
|
mc:Ignorable="d">
|
|
<Page.Resources>
|
|
<ResourceDictionary>
|
|
<FontFamily x:Key="IconFont">pack://application:,,,/RookieStation;component/Resources/Fonts/#iconfont</FontFamily>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Page.Resources>
|
|
<Grid Margin="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="35" />
|
|
<RowDefinition Height="35" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="0.5*" />
|
|
</Grid.ColumnDefinitions>
|
|
<hc:ComboBox
|
|
x:Name="cbbLibrary"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
hc:InfoElement.Placeholder="请选择库"
|
|
DisplayMemberPath="Key"
|
|
SelectedValuePath="Value"
|
|
SelectionChanged="cbbLibrary_SelectionChanged" />
|
|
<Button
|
|
x:Name="btnSelectPath"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Click="btnSelectPath_Click"
|
|
Content=""
|
|
FontFamily="{StaticResource IconFont}"
|
|
ToolTip="选择族库路径" />
|
|
<hc:TextBox
|
|
x:Name="tbSearch"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
hc:InfoElement.Placeholder="请输入搜索的族文件名"
|
|
FontFamily="{StaticResource IconFont}"
|
|
TextChanged="tbSearch_TextChanged" />
|
|
<Button
|
|
x:Name="btnSearch"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Click="btnSearch_Click"
|
|
Content=""
|
|
FontFamily="{StaticResource IconFont}"
|
|
IsDefault="True" />
|
|
<ListBox x:Name="lbFamilyLib" Grid.Row="2" Grid.ColumnSpan="3" Style="{DynamicResource WrapPanelHorizontalListBox}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="10" BorderBrush="Black" BorderThickness="2" CornerRadius="5">
|
|
<Grid Width="128">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="128" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Image
|
|
Grid.Row="0"
|
|
Width="128"
|
|
Height="128"
|
|
Source="{Binding ImageData}"
|
|
Stretch="Uniform"
|
|
ToolTip="{Binding ToolTip}" />
|
|
<hc:RunningBlock Grid.Row="1" Runaway="False">
|
|
<TextBlock Text="{Binding Title}" TextAlignment="Center" />
|
|
</hc:RunningBlock>
|
|
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<StackPanel.Style>
|
|
<Style TargetType="{x:Type StackPanel}">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsMouseOver}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</StackPanel.Style>
|
|
|
|
<Button
|
|
Width="64"
|
|
Margin="2"
|
|
Click="BtnLoadFamily_Click"
|
|
Content="载入"
|
|
FontFamily="{StaticResource IconFont}"
|
|
ToolTip="载入项目" />
|
|
<Button
|
|
Width="64"
|
|
Margin="2"
|
|
Click="BtnOpenFile_Click"
|
|
Content="定位"
|
|
FontFamily="{StaticResource IconFont}"
|
|
ToolTip="定位文件" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Page> |