83 lines
2.3 KiB
XML
83 lines
2.3 KiB
XML
<UserControl
|
|
x:Class="XplorePlane.Views.LibraryVersionsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:XplorePlane.ViewModels">
|
|
<UserControl.DataContext>
|
|
<vm:LibraryVersionsViewModel />
|
|
</UserControl.DataContext>
|
|
<UserControl.Resources>
|
|
<Style x:Key="CategoryHeader" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Foreground" Value="#1565C0" />
|
|
<Setter Property="Margin" Value="0,12,0,4" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="16">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,12">
|
|
<TextBlock
|
|
Margin="0,0,0,4"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="引用库版本信息" />
|
|
<TextBlock
|
|
FontSize="12"
|
|
Foreground="Gray"
|
|
Text="{Binding AppVersion, StringFormat='应用程序版本: {0}'}" />
|
|
</StackPanel>
|
|
|
|
<DataGrid
|
|
x:Name="LibraryGrid"
|
|
Grid.Row="1"
|
|
AlternatingRowBackground="#F9F9F9"
|
|
AutoGenerateColumns="False"
|
|
BorderBrush="#E0E0E0"
|
|
BorderThickness="1"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
ColumnHeaderHeight="32"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding Libraries}"
|
|
RowHeight="28"
|
|
SelectionMode="Single">
|
|
<DataGrid.GroupStyle>
|
|
<GroupStyle>
|
|
<GroupStyle.ContainerStyle>
|
|
<Style TargetType="GroupItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="GroupItem">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource CategoryHeader}" Text="{Binding Name}" />
|
|
<ItemsPresenter />
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</GroupStyle.ContainerStyle>
|
|
</GroupStyle>
|
|
</DataGrid.GroupStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="220"
|
|
Binding="{Binding Name}"
|
|
Header="库名称" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Version}"
|
|
Header="版本" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</UserControl>
|