SystemItem.xaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <UserControl x:Class="GeekDesk.Control.UserControls.SystemItem.SystemItem"
  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:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:GeekDesk.Control.UserControls.IconFont"
  8. mc:Ignorable="d"
  9. Background="#00FFFFFF"
  10. >
  11. <WrapPanel HorizontalAlignment="Center" VerticalAlignment="Top" Background="Transparent">
  12. <ListBox x:Name="ItemListBox" ItemsSource="{Binding IconInfos}" BorderThickness="0"
  13. VirtualizingPanel.IsVirtualizing="True"
  14. VirtualizingPanel.IsContainerVirtualizable="True"
  15. >
  16. <ListBox.ItemsPanel>
  17. <ItemsPanelTemplate>
  18. <WrapPanel Orientation="Horizontal" Background="#00FFFFFF"/>
  19. </ItemsPanelTemplate>
  20. </ListBox.ItemsPanel>
  21. <ListBox.Background>
  22. <SolidColorBrush Opacity="0"/>
  23. </ListBox.Background>
  24. <ListBox.ItemContainerStyle>
  25. <Style TargetType="ListBoxItem">
  26. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  27. </Style>
  28. </ListBox.ItemContainerStyle>
  29. <ListBox.ItemTemplate>
  30. <DataTemplate>
  31. <StackPanel Width="80" Height="80" HorizontalAlignment="Center"
  32. Background="#00FFFFFF"
  33. hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
  34. hc:Poptip.Content="{Binding Content_NoWrite, Mode=OneWay}"
  35. Tag="{Binding}"
  36. MouseLeftButtonDown="Icon_MouseLeftButtonDown"
  37. hc:Poptip.Placement="BottomLeft"
  38. hc:Poptip.HitMode="None"
  39. >
  40. <Image Source="{Binding BitmapImage_NoWrite, Mode=OneWay}" Width="45" Height="45" RenderOptions.BitmapScalingMode="HighQuality" />
  41. <TextBlock TextAlignment="Center"
  42. HorizontalAlignment="Center"
  43. VerticalAlignment="Center"
  44. TextWrapping="Wrap"
  45. MaxHeight="40"
  46. FontSize="13"
  47. TextTrimming="WordEllipsis"
  48. Width="65" Text="{Binding Name_NoWrite, Mode=OneWay}"
  49. />
  50. </StackPanel>
  51. </DataTemplate>
  52. </ListBox.ItemTemplate>
  53. </ListBox>
  54. </WrapPanel>
  55. </UserControl>