DevicePlot.xaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <UserControl x:Class="DeviceManagement.Controls.DevicePlot"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:DeviceManagement.Controls"
  7. mc:Ignorable="d"
  8. x:Name="This"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <Border BorderBrush="DarkGray" Background="#f2f2f2" CornerRadius="16" BorderThickness="1" Margin="8" Width="360" Height="200">
  11. <Grid Margin="12,8">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="120"/>
  14. <ColumnDefinition/>
  15. </Grid.ColumnDefinitions>
  16. <Grid Margin="0,8">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="auto"/>
  19. <RowDefinition Height="4"/>
  20. <RowDefinition Height="auto"/>
  21. <RowDefinition Height="8"/>
  22. <RowDefinition Height="auto"/>
  23. <RowDefinition Height="4"/>
  24. <RowDefinition Height="auto"/>
  25. <RowDefinition Height="*"/>
  26. <RowDefinition Height="auto"/>
  27. </Grid.RowDefinitions>
  28. <TextBlock Grid.Row="0" FontSize="18" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceModel}"/>
  29. <TextBlock Grid.Row="2" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceSubModel}"/>
  30. <TextBlock Grid.Row="4" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.DeviceName}"/>
  31. <TextBlock Grid.Row="6" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=DeviceInfo.Position}"/>
  32. <Button Grid.Row="8" Height="32" Background="Transparent" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="120" BorderBrush="{StaticResource ThemeColor}"
  33. Command="{Binding ElementName=This, Path=DetailCommand}" CommandParameter="{Binding ElementName=This, Path=DeviceInfo}">
  34. <TextBlock Foreground="{StaticResource ThemeColor}" Margin="8,0">查看数据 →</TextBlock>
  35. </Button>
  36. </Grid>
  37. <Image Grid.Column="1" Source="/DeviceManagement;component/Resources/Kepler.png" Stretch="Uniform"/>
  38. <Button Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Background="Transparent" BorderThickness="0"
  39. Command="{Binding ElementName=This, Path=SettingCommand}" CommandParameter="{Binding ElementName=This, Path=DeviceInfo}">
  40. <Image Source="{StaticResource Icon_SettingGear}" Height="24" />
  41. </Button>
  42. </Grid>
  43. </Border>
  44. </UserControl>