Skip to content

Commit 07315af

Browse files
committed
Adds margin to TreeListView content
Adds a margin to the TreeListView's content presenter to improve spacing.
1 parent 259f12a commit 07315af

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ListView.xaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@
193193
</Style.Triggers>
194194
</Style>
195195

196-
197-
198196
<Style x:Key="MaterialDesignListView" TargetType="{x:Type ListView}">
199197
<Style.Resources>
200198
<converters:ListViewGridViewConverter x:Key="MaterialDesignListViewItemContainerStyleConverter"

src/MaterialDesignThemes.Wpf/TreeListView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ private DataTemplate CreateToggleButtonTemplate(DataTemplate originalTemplate)
324324
if (originalTemplate != null)
325325
{
326326
var originalContentFactory = new FrameworkElementFactory(typeof(ContentPresenter));
327+
originalContentFactory.SetValue(ContentPresenter.MarginProperty, new Thickness(8, 0, 0, 0));
327328
originalContentFactory.SetValue(ContentPresenter.ContentTemplateProperty, originalTemplate);
328329
stackPanelFactory.AppendChild(originalContentFactory);
329330
}

0 commit comments

Comments
 (0)