终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

52 řádky
2.3 KiB

  1. <UserControl
  2. x:Class="WPFDemo.TheListBox"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:WPFDemo"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. mc:Ignorable="d">
  11. <ListView
  12. x:Name="listView"
  13. Background="{x:Null}"
  14. Foreground="White"
  15. ItemsSource="{Binding ViewItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  16. PreviewMouseLeftButtonUp="lisbox_PreviewMouseLeftButtonUp"
  17. PreviewMouseMove="ListView_PreviewMouseMove">
  18. <ListBox.ItemTemplate>
  19. <ItemContainerTemplate>
  20. <Border
  21. x:Name="border"
  22. Padding="5"
  23. Background="#FF18888A"
  24. BorderBrush="Aquamarine"
  25. BorderThickness="1"
  26. MouseLeftButtonDown="Border_MouseLeftButtonDown"
  27. Tag="border">
  28. <Grid>
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition Width="60" />
  31. <ColumnDefinition />
  32. <ColumnDefinition Width="100" />
  33. <ColumnDefinition Width="60" />
  34. </Grid.ColumnDefinitions>
  35. <TextBlock
  36. Grid.Column="0"
  37. Margin="10,0,10,0"
  38. Text="{Binding Name, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
  39. <TextBlock Grid.Column="1" Text="{Binding Ph, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
  40. <TextBox Grid.Column="1" Width="100" />
  41. <ComboBox Grid.Column="2" Width="60">
  42. <ComboBoxItem>sdsds</ComboBoxItem>
  43. <ComboBoxItem>sdsds</ComboBoxItem>
  44. <ComboBoxItem>sdsds</ComboBoxItem>
  45. </ComboBox>
  46. </Grid>
  47. </Border>
  48. </ItemContainerTemplate>
  49. </ListBox.ItemTemplate>
  50. </ListView>
  51. </UserControl>