schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<UserControl x:Class="XHandler.Controls.WellPlateEx"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:XHandler.Controls"
             mc:Ignorable="d" 
             Height="200" Width="350" 
             TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType" TextOptions.TextHintingMode="Fixed" UseLayoutRounding="True"
             Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Style x:Key="smallTextStyle1" TargetType="{x:Type TextBlock}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="#FF5A5959"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontFamily" Value="微软雅黑"/>
            <!--<Setter Property="Width" Value="25.5"/>-->
            <Setter Property="Margin" Value="0, 0, 0, 0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
        <Style x:Key="smallTextStyle2" TargetType="{x:Type TextBlock}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="#FF5A5959"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontFamily" Value="微软雅黑"/>
            <!--<Setter Property="Width" Value="20"/>-->
            <!--<Setter Property="Height" Value="20"/>-->
            <Setter Property="Margin" Value="0, 0, 0, 0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Polygon Stroke="Gray" StrokeThickness="1" Points="10,0 350,0 350,200 0,200 0,10" Fill="#FFECF7FF"/>
        <!--<StackPanel Orientation="Horizontal" Margin="36,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Left">
            <TextBlock Text="1" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="2" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="3" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="4" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="5" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="6" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="7" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="8" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="9" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="10" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="11" Style="{DynamicResource smallTextStyle1}"/>
            <TextBlock Text="12" Style="{DynamicResource smallTextStyle1}"/>
        </StackPanel>
        <StackPanel Orientation="Vertical" Margin="10,30,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
            <TextBlock Text="A" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="B" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="C" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="D" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="E" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="F" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="G" Style="{DynamicResource smallTextStyle2}"/>
            <TextBlock Text="H" Style="{DynamicResource smallTextStyle2}"/>
        </StackPanel>-->
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="10"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>
 
            <Grid x:Name="topGrid" Grid.Row="0" Grid.Column="1" VerticalAlignment="Bottom" Margin="0 0 0 5"/>
            <Grid x:Name="leftGrid" Grid.Row="1" Grid.Column="0"/>
            <Grid x:Name="idGrid" Grid.Row="1" Grid.Column="1" Background="#FFECF7FF" PreviewMouseLeftButtonDown="idGrid_PreviewMouseLeftButtonDown"
                  PreviewMouseMove="idGrid_PreviewMouseMove" PreviewMouseLeftButtonUp="idGrid_PreviewMouseLeftButtonUp">
            </Grid>
 
        </Grid>
    </Grid>
</UserControl>