IconPannel.xaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <UserControl x:Class="GeekDesk.Control.UserControls.IconFont.IconPannel"
  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="IconListBox" ItemsSource="{Binding Iconfonts}" BorderThickness="0" Background="Transparent">
  13. <ListBox.ItemsPanel>
  14. <ItemsPanelTemplate>
  15. <WrapPanel Orientation="Horizontal" Background="Transparent"/>
  16. </ItemsPanelTemplate>
  17. </ListBox.ItemsPanel>
  18. <ListBox.ItemContainerStyle>
  19. <Style>
  20. </Style>
  21. </ListBox.ItemContainerStyle>
  22. <ListBox.ItemTemplate>
  23. <DataTemplate>
  24. <StackPanel Width="80" Height="80">
  25. <Button Background="Transparent"
  26. BorderThickness="0"
  27. IsEnabled="False"
  28. Opacity="0.8"
  29. hc:IconElement.Geometry="{Binding Text}"
  30. hc:IconElement.Height="35"
  31. hc:IconElement.Width="35"
  32. Height="60"
  33. Width="60"
  34. />
  35. <TextBlock TextAlignment="Center"
  36. HorizontalAlignment="Center"
  37. VerticalAlignment="Center"
  38. Width="100" Text="{Binding Name}" />
  39. </StackPanel>
  40. </DataTemplate>
  41. </ListBox.ItemTemplate>
  42. </ListBox>
  43. </WrapPanel>
  44. </UserControl>