123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <UserControl x:Class="DeviceManagement.Controls.DevicePlot"
- 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:DeviceManagement.Controls"
- mc:Ignorable="d"
- x:Name="This"
- d:DesignHeight="450" d:DesignWidth="800">
- <Border BorderBrush="DarkGray" Background="#f2f2f2" CornerRadius="16" BorderThickness="1" Margin="8" Width="360" Height="200">
- <Grid Margin="12,8">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Grid Margin="0,8">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="4"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="8"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="4"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <TextBlock Grid.Row="0" FontSize="18" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceModel}"/>
- <TextBlock Grid.Row="2" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceSubModel}"/>
- <TextBlock Grid.Row="4" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceName}"/>
- <TextBlock Grid.Row="6" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.Position}"/>
- <Button Grid.Row="8" Height="32" Background="Transparent" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="120" BorderBrush="{StaticResource ThemeColor}"
- Command="{Binding ElementName=This, Path=DetailCommand}" CommandParameter="{Binding ElementName=This, Path=DeviceInfo}">
- <TextBlock Foreground="{StaticResource ThemeColor}" Margin="8,0">查看数据 →</TextBlock>
- </Button>
- </Grid>
- <Image Grid.Column="1" Source="/DeviceManagement;component/Resources/Kepler.png" Stretch="Uniform"/>
- <Button Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Background="Transparent" BorderThickness="0"
- Command="{Binding ElementName=This, Path=SettingCommand}" CommandParameter="{Binding ElementName=This, Path=DeviceInfo}">
- <Image Source="{StaticResource Icon_SettingGear}" Height="24" />
- </Button>
- </Grid>
- </Border>
- </UserControl>
|