Skip to content

Commit 7fbc5d1

Browse files
committed
Add scrollbar to Todo Settings, closes #2225
1 parent a693581 commit 7fbc5d1

File tree

1 file changed

+39
-30
lines changed

1 file changed

+39
-30
lines changed

RetailCoder.VBE/UI/Settings/TodoSettings.xaml

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@
244244
</Style>
245245
</UserControl.Resources>
246246
<Grid>
247+
<Grid.RowDefinitions>
248+
<RowDefinition Height="Auto"/>
249+
<RowDefinition Height="*"/>
250+
</Grid.RowDefinitions>
251+
247252
<StackPanel Margin="5,5,5,0">
248253
<Label Background="DarkGray"
249254
HorizontalContentAlignment="Stretch"
@@ -324,39 +329,43 @@
324329
</Button>
325330
</ToolBar>
326331
</ToolBarTray>
327-
<DataGrid Name="TodoMarkerGrid"
328-
ItemsSource="{Binding TodoSettings}"
329-
AutoGenerateColumns="False"
330-
CanUserReorderColumns="False"
331-
IsReadOnly="False"
332-
SelectionMode="Single"
333-
CanUserAddRows="False"
334-
HorizontalGridLinesBrush="Transparent"
335-
VerticalGridLinesBrush="Transparent"
336-
HeadersVisibility="Column"
337-
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
338-
ItemContainerStyle="{StaticResource PrettifyRow}"
339-
ColumnHeaderHeight="22"
340-
BorderThickness="0"
341-
CellEditEnding="TodoMarkerGrid_CellEditEnding">
342-
<DataGrid.InputBindings>
343-
<KeyBinding Key="Delete"
332+
</StackPanel>
333+
<DataGrid Name="TodoMarkerGrid"
334+
Grid.Row="1"
335+
Margin="5,0,5,5"
336+
ItemsSource="{Binding TodoSettings}"
337+
AutoGenerateColumns="False"
338+
CanUserReorderColumns="False"
339+
IsReadOnly="False"
340+
SelectionMode="Single"
341+
CanUserAddRows="False"
342+
HorizontalGridLinesBrush="Transparent"
343+
VerticalGridLinesBrush="Transparent"
344+
HeadersVisibility="Column"
345+
ScrollViewer.CanContentScroll="True"
346+
ScrollViewer.VerticalScrollBarVisibility="Auto"
347+
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
348+
ItemContainerStyle="{StaticResource PrettifyRow}"
349+
ColumnHeaderHeight="22"
350+
BorderThickness="0"
351+
CellEditEnding="TodoMarkerGrid_CellEditEnding">
352+
<DataGrid.InputBindings>
353+
<KeyBinding Key="Delete"
344354
Command="{Binding DeleteTodoCommand}"
345355
CommandParameter="{Binding ElementName=TodoMarkerGrid, Path=SelectedItem}" />
346-
</DataGrid.InputBindings>
347-
<DataGrid.CellStyle>
348-
<Style TargetType="{x:Type DataGridCell}">
349-
<Setter Property="BorderThickness" Value="0" />
350-
<Setter Property="VerticalAlignment" Value="Center" />
351-
<Setter Property="Background" Value="Transparent" />
352-
</Style>
353-
</DataGrid.CellStyle>
354-
<DataGrid.Columns>
355-
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_TextLabel}"
356+
</DataGrid.InputBindings>
357+
<DataGrid.CellStyle>
358+
<Style TargetType="{x:Type DataGridCell}">
359+
<Setter Property="BorderThickness" Value="0" />
360+
<Setter Property="VerticalAlignment" Value="Center" />
361+
<Setter Property="Background" Value="Transparent" />
362+
</Style>
363+
</DataGrid.CellStyle>
364+
<DataGrid.Columns>
365+
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_TextLabel}"
356366
Width="*"
357367
Binding="{Binding Text}" />
358-
</DataGrid.Columns>
359-
</DataGrid>
360-
</StackPanel>
368+
</DataGrid.Columns>
369+
</DataGrid>
361370
</Grid>
362371
</UserControl>

0 commit comments

Comments
 (0)