Skip to content

Commit 8fa7a8d

Browse files
committed
Applied the suggested name changes by @michael-hawker
1 parent e3f5a7f commit 8fa7a8d

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Layout/ListDetailsView/ListDetailsView.Properties.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,21 @@ public partial class ListDetailsView
106106
new PropertyMetadata(null));
107107

108108
/// <summary>
109-
/// Identifies the <see cref="ListPaneNoItemsContent"/> dependency property.
109+
/// Identifies the <see cref="ListPaneEmptyContent"/> dependency property.
110110
/// </summary>
111-
/// <returns>The identifier for the <see cref="ListPaneNoItemsContent"/> dependency property.</returns>
112-
public static readonly DependencyProperty ListPaneNoItemsContentProperty = DependencyProperty.Register(
113-
nameof(ListPaneNoItemsContent),
111+
/// <returns>The identifier for the <see cref="ListPaneEmptyContent"/> dependency property.</returns>
112+
public static readonly DependencyProperty ListPaneEmptyContentProperty = DependencyProperty.Register(
113+
nameof(ListPaneEmptyContent),
114114
typeof(object),
115115
typeof(ListDetailsView),
116116
new PropertyMetadata(null));
117117

118118
/// <summary>
119-
/// Identifies the <see cref="ListPaneNoItemsContentTemplate"/> dependency property.
119+
/// Identifies the <see cref="ListPaneEmptyContentTemplate"/> dependency property.
120120
/// </summary>
121-
/// <returns>The identifier for the <see cref="ListPaneNoItemsContentTemplate"/> dependency property.</returns>
122-
public static readonly DependencyProperty ListPaneNoItemsContentTemplateProperty = DependencyProperty.Register(
123-
nameof(ListPaneNoItemsContentTemplate),
121+
/// <returns>The identifier for the <see cref="ListPaneEmptyContentTemplate"/> dependency property.</returns>
122+
public static readonly DependencyProperty ListPaneEmptyContentTemplateProperty = DependencyProperty.Register(
123+
nameof(ListPaneEmptyContentTemplate),
124124
typeof(DataTemplate),
125125
typeof(ListDetailsView),
126126
new PropertyMetadata(null));
@@ -321,10 +321,10 @@ public DataTemplate ListHeaderTemplate
321321
/// <returns>
322322
/// The content of the list pane's header. The default is null.
323323
/// </returns>
324-
public object ListPaneNoItemsContent
324+
public object ListPaneEmptyContent
325325
{
326-
get { return GetValue(ListPaneNoItemsContentProperty); }
327-
set { SetValue(ListPaneNoItemsContentProperty, value); }
326+
get { return GetValue(ListPaneEmptyContentProperty); }
327+
set { SetValue(ListPaneEmptyContentProperty, value); }
328328
}
329329

330330
/// <summary>
@@ -333,10 +333,10 @@ public object ListPaneNoItemsContent
333333
/// <returns>
334334
/// The template that specifies the visualization of the list pane no items object. The default is null.
335335
/// </returns>
336-
public DataTemplate ListPaneNoItemsContentTemplate
336+
public DataTemplate ListPaneEmptyContentTemplate
337337
{
338-
get { return (DataTemplate)GetValue(ListPaneNoItemsContentTemplateProperty); }
339-
set { SetValue(ListPaneNoItemsContentTemplateProperty, value); }
338+
get { return (DataTemplate)GetValue(ListPaneEmptyContentTemplateProperty); }
339+
set { SetValue(ListPaneEmptyContentTemplateProperty, value); }
340340
}
341341

342342
/// <summary>

Microsoft.Toolkit.Uwp.UI.Controls.Layout/ListDetailsView/ListDetailsView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public partial class ListDetailsView : ItemsControl
3838
private const string PartRootPanel = "RootPanel";
3939
private const string PartDetailsPresenter = "DetailsPresenter";
4040
private const string PartDetailsPanel = "DetailsPanel";
41-
private const string PartMasterList = "MasterList";
41+
private const string PartMainList = "MainList";
4242
private const string PartBackButton = "ListDetailsBackButton";
4343
private const string PartHeaderContentPresenter = "HeaderContentPresenter";
4444
private const string PartListPaneCommandBarPanel = "ListPaneCommandBarPanel";
@@ -405,7 +405,7 @@ private void FocusFirstFocusableElementInDetails()
405405
/// </summary>
406406
private void FocusItemList()
407407
{
408-
if (GetTemplateChild("PartMasterList") is Control list)
408+
if (GetTemplateChild("PartMainList") is Control list)
409409
{
410410
list.Focus(FocusState.Programmatic);
411411
}

Microsoft.Toolkit.Uwp.UI.Controls.Layout/ListDetailsView/ListDetailsView.xaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
To="NoSelectionNarrow">
9292
<Storyboard>
9393
<DoubleAnimation BeginTime="0:0:0"
94-
Storyboard.TargetName="MasterPresenterTransform"
94+
Storyboard.TargetName="ListPresenterTransform"
9595
Storyboard.TargetProperty="X"
9696
From="-200"
9797
To="0"
@@ -118,14 +118,14 @@
118118
<VisualStateGroup x:Name="HasItemsStates">
119119
<VisualState x:Name="HasItemsState">
120120
<VisualState.Setters>
121-
<Setter Target="MasterList.Visibility" Value="Visible" />
122-
<Setter Target="MasterNoItemsPresenter.Visibility" Value="Collapsed" />
121+
<Setter Target="MainList.Visibility" Value="Visible" />
122+
<Setter Target="MainListEmptyItemsPresenter.Visibility" Value="Collapsed" />
123123
</VisualState.Setters>
124124
</VisualState>
125125
<VisualState x:Name="HasNoItemsState">
126126
<VisualState.Setters>
127-
<Setter Target="MasterList.Visibility" Value="Collapsed" />
128-
<Setter Target="MasterNoItemsPresenter.Visibility" Value="Visible" />
127+
<Setter Target="MainList.Visibility" Value="Collapsed" />
128+
<Setter Target="MainListEmptyItemsPresenter.Visibility" Value="Visible" />
129129
</VisualState.Setters>
130130
</VisualState>
131131
</VisualStateGroup>
@@ -149,11 +149,11 @@
149149
Content="{TemplateBinding ListHeader}"
150150
ContentTemplate="{TemplateBinding ListHeaderTemplate}"
151151
Visibility="Collapsed" />
152-
<ContentPresenter x:Name="MasterNoItemsPresenter"
152+
<ContentPresenter x:Name="MainListEmptyItemsPresenter"
153153
Grid.Row="1"
154-
Content="{TemplateBinding ListPaneNoItemsContent}"
155-
ContentTemplate="{TemplateBinding ListPaneNoItemsContentTemplate}" />
156-
<ListView x:Name="MasterList"
154+
Content="{TemplateBinding ListPaneEmptyContent}"
155+
ContentTemplate="{TemplateBinding ListPaneEmptyContentTemplate}" />
156+
<ListView x:Name="MainList"
157157
Grid.Row="1"
158158
IsTabStop="False"
159159
ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
@@ -166,7 +166,7 @@
166166
<Grid x:Name="ListCommandBar"
167167
Grid.Row="2" />
168168
<Grid.RenderTransform>
169-
<TranslateTransform x:Name="MasterPresenterTransform" />
169+
<TranslateTransform x:Name="ListPresenterTransform" />
170170
</Grid.RenderTransform>
171171
</Grid>
172172
</muxc:TwoPaneView.Pane1>

0 commit comments

Comments
 (0)