Browse Source

compdfkit(win) - 主页面绑定失败问题

weixiangjie 11 months ago
parent
commit
caa730f609

+ 9 - 1
Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml

@@ -38,7 +38,7 @@
                 </Setter.Value>
             </Setter>
         </Style>
-
+        
         <Style TargetType="ListBox" x:Key="WrapListBoxStyle">
             <Setter Property="BorderThickness" Value="0" />
             <Setter Property="BorderBrush" Value="Transparent" />
@@ -70,9 +70,17 @@
                 <RowDefinition  Height="auto"></RowDefinition>
             </Grid.RowDefinitions>
             <ListBox  x:Name="FeaturesListBox" Style="{StaticResource WrapListBoxStyle}" ItemsSource="{Binding PageItems}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"  SelectionMode="Single" >
+                <ListBox.Resources>
+                    <Style TargetType="ListBoxItem">
+                        <Setter Property="HorizontalContentAlignment" Value="Center" />
+                        <Setter Property="VerticalContentAlignment" Value="Center" />
+                    </Style>
+                </ListBox.Resources>
                 <ListBox.ItemContainerStyle>
                     <Style TargetType="ListBoxItem">
                         <Setter Property="Margin" Value="{Binding ItemMargin}" />
+                        <Setter Property="HorizontalContentAlignment" Value="Center" />
+                        <Setter Property="VerticalContentAlignment" Value="Center" />
                         <Setter Property="Template">
                             <Setter.Value>
                                 <ControlTemplate TargetType="ListBoxItem">