1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <Window x:Class="AIPractice.LabelEditor.LinkingLabelWindow"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:AIPractice.LabelEditor"
- mc:Ignorable="d"
- Title="选择要关联的标签" Height="400" Width="200" ResizeMode="NoResize" WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen" Padding="0">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="40"/>
- </Grid.RowDefinitions>
- <ListBox x:Name="LabelList">
- <ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type local:ImageLabelViewModel}">
- <TextBlock Margin="4,2,4,2" FontSize="14" Text="{Binding Title}"/>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ListBox>
- <Button Grid.Row="1" Width="64" HorizontalAlignment="Right" Margin="0,8,8,8" Click="OnOkClick">
- <Button.Template>
- <ControlTemplate>
- <Border x:Name="ButtonBorder" BorderThickness="1" BorderBrush="Gray" CornerRadius="2">
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
- <TextBlock Margin="2" VerticalAlignment="Center" Text="确定"/>
- </StackPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="CadetBlue"/>
- </Trigger>
- <Trigger Property="Button.IsPressed" Value="True">
- <Setter TargetName="ButtonBorder" Property="Background" Value="Azure"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Window>
|