alielie
2025-04-10 6bcafc823e836ecd5790f87178a906333699f868
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<pu:WindowX x:Class="HMI.MenuManage.IconSelector"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:HMI.MenuManage"
            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
            xmlns:pw="https://opensource.panuon.com/wpf"
            xmlns:pu="https://opensource.panuon.com/wpf-ui"
            mc:Ignorable="d"
            Title="Form"
            SizeToContent="Height"
            Width="600"
            Style="{StaticResource ModalWindow}"
            WindowStartupLocation="CenterOwner"
            Foreground="Black">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
                <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
 
    <Grid>
        <ListBox Margin="10" x:Name="list" 
                 FontSize="50"
                 SelectedValue="{Binding Data}"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel HorizontalAlignment="Center" Orientation="Horizontal" IsItemsHost="True">
                    </WrapPanel>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
 
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Label FontFamily="{StaticResource iconfont}" Content="{Binding }"/>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
    
    
</pu:WindowX>