IconPannel.xaml 2.1 KB

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