|
89 | 89 | </Setter> |
90 | 90 | </Style> |
91 | 91 |
|
| 92 | + <Style x:Key="PropertyItemsControlBaseStyle" TargetType="hc:PropertyItemsControl"> |
| 93 | + <Setter Property="ItemContainerStyle" Value="{StaticResource PropertyItemBaseStyle}"/> |
| 94 | + <Setter Property="Focusable" Value="False"/> |
| 95 | + <Setter Property="Template"> |
| 96 | + <Setter.Value> |
| 97 | + <ControlTemplate TargetType="hc:PropertyItemsControl"> |
| 98 | + <hc:ScrollViewer Focusable="false" HorizontalScrollBarVisibility="Disabled"> |
| 99 | + <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> |
| 100 | + </hc:ScrollViewer> |
| 101 | + </ControlTemplate> |
| 102 | + </Setter.Value> |
| 103 | + </Setter> |
| 104 | + <Style.Triggers> |
| 105 | + <Trigger Property="IsGrouping" Value="False"> |
| 106 | + <Setter Property="ScrollViewer.CanContentScroll" Value="True"/> |
| 107 | + </Trigger> |
| 108 | + </Style.Triggers> |
| 109 | + </Style> |
| 110 | + |
92 | 111 | <Style x:Key="PropertyGroupItemBaseStyle" TargetType="GroupItem"> |
93 | 112 | <Setter Property="Margin" Value="0,0,0,6"/> |
94 | 113 | <Setter Property="Padding" Value="10,6,6,0"/> |
95 | 114 | <Setter Property="Template"> |
96 | 115 | <Setter.Value> |
97 | 116 | <ControlTemplate TargetType="GroupItem"> |
98 | | - <Expander BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Header="{Binding Name}" IsExpanded="True" Background="{DynamicResource SecondaryRegionBrush}" Foreground="{DynamicResource PrimaryTextBrush}"> |
| 117 | + <Expander Name="exp" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Header="{Binding Name}" IsExpanded="True" Background="{DynamicResource SecondaryRegionBrush}" Foreground="{DynamicResource PrimaryTextBrush}"> |
99 | 118 | <Border BorderThickness="1,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" CornerRadius="0,0,4,4"> |
100 | 119 | <ItemsPresenter Margin="{TemplateBinding Padding}"/> |
101 | 120 | </Border> |
|
105 | 124 | </Setter> |
106 | 125 | </Style> |
107 | 126 |
|
108 | | - <ItemsPanelTemplate x:Key="PropertyItemsControlItemsPanelTemplate"> |
109 | | - <VirtualizingStackPanel FocusVisualStyle="{x:Null}" VirtualizationMode="Recycling"/> |
110 | | - </ItemsPanelTemplate> |
111 | | - |
112 | | - <Style x:Key="PropertyItemsControlBaseStyle" TargetType="hc:PropertyItemsControl"> |
113 | | - <Setter Property="ItemContainerStyle" Value="{StaticResource PropertyItemBaseStyle}"/> |
114 | | - <Setter Property="ItemsPanel" Value="{StaticResource PropertyItemsControlItemsPanelTemplate}"/> |
115 | | - <Setter Property="Focusable" Value="False"/> |
116 | | - </Style> |
117 | | - |
118 | 127 | <Style x:Key="PropertyGridBaseStyle" TargetType="hc:PropertyGrid"> |
119 | 128 | <Setter Property="MaxTitleWidth" Value="200"/> |
120 | 129 | <Setter Property="MinTitleWidth" Value="120"/> |
|
142 | 151 | </hc:ButtonGroup> |
143 | 152 | <hc:SearchBar x:Name="PART_SearchBar" IsRealTime="True" ShowClearButton="True" Style="{StaticResource SearchBarPlus}"/> |
144 | 153 | </DockPanel> |
145 | | - <ScrollViewer Grid.Row="1"> |
146 | | - <hc:PropertyItemsControl x:Name="PART_ItemsControl" Style="{StaticResource PropertyItemsControlBaseStyle}"> |
147 | | - <hc:PropertyItemsControl.GroupStyle> |
148 | | - <GroupStyle ContainerStyle="{StaticResource PropertyGroupItemBaseStyle}"/> |
149 | | - </hc:PropertyItemsControl.GroupStyle> |
150 | | - </hc:PropertyItemsControl> |
151 | | - </ScrollViewer> |
| 154 | + <hc:PropertyItemsControl Grid.Row="1" x:Name="PART_ItemsControl" Style="{StaticResource PropertyItemsControlBaseStyle}"> |
| 155 | + <hc:PropertyItemsControl.GroupStyle> |
| 156 | + <GroupStyle ContainerStyle="{StaticResource PropertyGroupItemBaseStyle}"/> |
| 157 | + </hc:PropertyItemsControl.GroupStyle> |
| 158 | + </hc:PropertyItemsControl> |
152 | 159 | </Grid> |
153 | 160 | </Border> |
154 | 161 | </ControlTemplate> |
|
0 commit comments