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
<UserControl x:Class="XHandler.View.Device.DeviceStatusCom"
             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:str="clr-namespace:XHandler.Properties"
             xmlns:ctrls="clr-namespace:XHandler.Controls"
             mc:Ignorable="d" 
             Height="auto" Width="auto" Loaded="UserControl_Loaded">
    <Grid>
        <Canvas x:Name="canvas" Width="0" Height="0" MouseMove="Canvas_MouseMove">
            <!--文本框-->
            <Border Name="border" 
                    BorderBrush="Black" BorderThickness="0" CornerRadius="5" Padding="5"
                    Height="40" Width="300"
                    MouseLeftButtonDown="border_MouseLeftButtonDown" MouseLeave="border_MouseLeave" 
                    MouseEnter="border_MouseEnter">
                <Border.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Border.RenderTransform>
 
                <StackPanel FlowDirection="LeftToRight" Orientation="Horizontal">
                    <ctrls:ImageButton Grid.Row="0" Grid.Column="4" x:Name="btnStatus" ImageWidth="28" ImageHeight="28" ClickMode="Hover"
                                       VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    <TextBlock Name="tBlockStatusTitle" Text="" VerticalAlignment="Center" Margin="20, 0, 0 ,0"/>
                </StackPanel>
            </Border>
        </Canvas>
    </Grid>
</UserControl>