feat:add AutoHide ToggleSwitch to DataGrid demo.
This commit is contained in:
parent
a3ed11fa10
commit
b80deac692
@ -14,7 +14,10 @@
|
||||
<TabControl>
|
||||
<TabItem Header="DataGrid">
|
||||
<Grid RowDefinitions="Auto, *">
|
||||
<ToggleSwitch Grid.Row="0" Content="Disable" Name="DisableToggle"></ToggleSwitch>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<ToggleSwitch Content="Disable" Name="DisableToggle" />
|
||||
<ToggleSwitch Content="ScrollViewerHide" Name="ScrollViewerHide" />
|
||||
</StackPanel>
|
||||
<DataGrid Grid.Row="1"
|
||||
Margin="8"
|
||||
CanUserReorderColumns="True"
|
||||
@ -22,6 +25,7 @@
|
||||
CanUserSortColumns="True"
|
||||
HeadersVisibility="All"
|
||||
IsReadOnly="True"
|
||||
ScrollViewer.AllowAutoHide="{Binding #ScrollViewerHide.IsChecked}"
|
||||
IsEnabled="{Binding #DisableToggle.IsChecked}"
|
||||
ItemsSource="{Binding GridData1}">
|
||||
<DataGrid.Columns>
|
||||
|
@ -471,7 +471,7 @@
|
||||
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
||||
<Setter Property="SelectionMode" Value="Extended" />
|
||||
<Setter Property="GridLinesVisibility" Value="None" />
|
||||
<Setter Property="ScrollViewer.AllowAutoHide" Value="True"></Setter>
|
||||
<Setter Property="ScrollViewer.AllowAutoHide" Value="True" />
|
||||
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
|
||||
<Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
|
||||
<Setter Property="DropLocationIndicatorTemplate">
|
||||
@ -574,11 +574,11 @@
|
||||
|
||||
<Style Selector="^[(ScrollViewer.AllowAutoHide)=False]">
|
||||
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
|
||||
<Setter Property="Grid.RowSpan" Value="1"></Setter>
|
||||
<Setter Property="Grid.ColumnSpan" Value="2"></Setter>
|
||||
<Setter Property="Grid.RowSpan" Value="1" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="2" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"></Setter>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
Loading…
x
Reference in New Issue
Block a user