Skip to content

Commit 1e81fa5

Browse files
authored
Merge pull request #2434 from comintern/next
Add scroll bar on Todo settings. Closes #2225
2 parents a7898d5 + 4fefe73 commit 1e81fa5

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
@@ -245,6 +245,11 @@
245245
</Style>
246246
</UserControl.Resources>
247247
<Grid>
248+
<Grid.RowDefinitions>
249+
<RowDefinition Height="Auto"/>
250+
<RowDefinition Height="*"/>
251+
</Grid.RowDefinitions>
252+
248253
<StackPanel Margin="5,5,5,0">
249254
<Label Background="DarkGray"
250255
HorizontalContentAlignment="Stretch"
@@ -311,39 +316,43 @@
311316
</Button>
312317
</ToolBar>
313318
</ToolBarTray>
314-
<DataGrid Name="TodoMarkerGrid"
315-
ItemsSource="{Binding TodoSettings}"
316-
AutoGenerateColumns="False"
317-
CanUserReorderColumns="False"
318-
IsReadOnly="False"
319-
SelectionMode="Single"
320-
CanUserAddRows="False"
321-
HorizontalGridLinesBrush="Transparent"
322-
VerticalGridLinesBrush="Transparent"
323-
HeadersVisibility="Column"
324-
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
325-
ItemContainerStyle="{StaticResource PrettifyRow}"
326-
ColumnHeaderHeight="22"
327-
BorderThickness="0"
328-
CellEditEnding="TodoMarkerGrid_CellEditEnding">
329-
<DataGrid.InputBindings>
330-
<KeyBinding Key="Delete"
319+
</StackPanel>
320+
<DataGrid Name="TodoMarkerGrid"
321+
Grid.Row="1"
322+
Margin="5,0,5,5"
323+
ItemsSource="{Binding TodoSettings}"
324+
AutoGenerateColumns="False"
325+
CanUserReorderColumns="False"
326+
IsReadOnly="False"
327+
SelectionMode="Single"
328+
CanUserAddRows="False"
329+
HorizontalGridLinesBrush="Transparent"
330+
VerticalGridLinesBrush="Transparent"
331+
HeadersVisibility="Column"
332+
ScrollViewer.CanContentScroll="True"
333+
ScrollViewer.VerticalScrollBarVisibility="Auto"
334+
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
335+
ItemContainerStyle="{StaticResource PrettifyRow}"
336+
ColumnHeaderHeight="22"
337+
BorderThickness="0"
338+
CellEditEnding="TodoMarkerGrid_CellEditEnding">
339+
<DataGrid.InputBindings>
340+
<KeyBinding Key="Delete"
331341
Command="{Binding DeleteTodoCommand}"
332342
CommandParameter="{Binding ElementName=TodoMarkerGrid, Path=SelectedItem}" />
333-
</DataGrid.InputBindings>
334-
<DataGrid.CellStyle>
335-
<Style TargetType="{x:Type DataGridCell}">
336-
<Setter Property="BorderThickness" Value="0" />
337-
<Setter Property="VerticalAlignment" Value="Center" />
338-
<Setter Property="Background" Value="Transparent" />
339-
</Style>
340-
</DataGrid.CellStyle>
341-
<DataGrid.Columns>
342-
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_TextLabel}"
343+
</DataGrid.InputBindings>
344+
<DataGrid.CellStyle>
345+
<Style TargetType="{x:Type DataGridCell}">
346+
<Setter Property="BorderThickness" Value="0" />
347+
<Setter Property="VerticalAlignment" Value="Center" />
348+
<Setter Property="Background" Value="Transparent" />
349+
</Style>
350+
</DataGrid.CellStyle>
351+
<DataGrid.Columns>
352+
<DataGridTextColumn Header="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=TodoSettings_TextLabel}"
343353
Width="*"
344354
Binding="{Binding Text}" />
345-
</DataGrid.Columns>
346-
</DataGrid>
347-
</StackPanel>
355+
</DataGrid.Columns>
356+
</DataGrid>
348357
</Grid>
349358
</UserControl>

0 commit comments

Comments
 (0)