Skip to content

Commit 354c7e3

Browse files
committed
Fixed ListViewExtensionsCode.bind file.
1 parent dc5a00b commit 354c7e3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListViewExtensions/ListViewExtensionsCode.bind

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
ui:ListViewExtensions.Command="{Binding SampleCommand}"
2727
ui:ListViewExtensions.AlternateColor="#33AAAAAA"
2828
ui:ListViewExtensions.AlternateItemTemplate="{StaticResource AlternateTemplate}"
29-
ui:ListViewExtensions.StretchItemContainerDirection="Both">
29+
ui:ListViewExtensions.ItemContainerStretchDirection="Both">
3030
</ListView>
3131
</Grid>
3232
</Page>

Microsoft.Toolkit.Uwp.UI/Extensions/ListViewBase/ListViewExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static partial class ListViewExtensions
3131
/// <summary>
3232
/// Attached <see cref="DependencyProperty"/> for setting the container content stretch direction on the <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
3333
/// </summary>
34-
public static readonly DependencyProperty ItemContainerStretchDirectionProperty = DependencyProperty.RegisterAttached("ItemContainerStretchDirection", typeof(ItemContainerStretchDirection), typeof(ListViewExtensions), new PropertyMetadata(null, OnStretchItemContainerDirectionPropertyChanged));
34+
public static readonly DependencyProperty ItemContainerStretchDirectionProperty = DependencyProperty.RegisterAttached("ItemContainerStretchDirection", typeof(ItemContainerStretchDirection), typeof(ListViewExtensions), new PropertyMetadata(null, OnItemContainerStretchDirectionPropertyChanged));
3535

3636
/// <summary>
3737
/// Gets the alternate <see cref="Brush"/> associated with the specified <see cref="Windows.UI.Xaml.Controls.ListViewBase"/>
@@ -154,7 +154,7 @@ private static void ItemTemplateContainerContentChanging(Windows.UI.Xaml.Control
154154
}
155155
}
156156

157-
private static void OnStretchItemContainerDirectionPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
157+
private static void OnItemContainerStretchDirectionPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
158158
{
159159
Windows.UI.Xaml.Controls.ListViewBase listViewBase = sender as Windows.UI.Xaml.Controls.ListViewBase;
160160

@@ -163,17 +163,17 @@ private static void OnStretchItemContainerDirectionPropertyChanged(DependencyObj
163163
return;
164164
}
165165

166-
listViewBase.ContainerContentChanging -= StretchItemContainerDirectionChanging;
166+
listViewBase.ContainerContentChanging -= ItemContainerStretchDirectionChanging;
167167
listViewBase.Unloaded -= OnListViewBaseUnloaded;
168168

169169
if (ItemContainerStretchDirectionProperty != null)
170170
{
171-
listViewBase.ContainerContentChanging += StretchItemContainerDirectionChanging;
171+
listViewBase.ContainerContentChanging += ItemContainerStretchDirectionChanging;
172172
listViewBase.Unloaded += OnListViewBaseUnloaded;
173173
}
174174
}
175175

176-
private static void StretchItemContainerDirectionChanging(Windows.UI.Xaml.Controls.ListViewBase sender, ContainerContentChangingEventArgs args)
176+
private static void ItemContainerStretchDirectionChanging(Windows.UI.Xaml.Controls.ListViewBase sender, ContainerContentChangingEventArgs args)
177177
{
178178
var itemContainer = args.ItemContainer as SelectorItem;
179179
var stretchDirection = GetItemContainerStretchDirection(sender);
@@ -194,7 +194,7 @@ private static void OnListViewBaseUnloaded(object sender, RoutedEventArgs e)
194194
Windows.UI.Xaml.Controls.ListViewBase listViewBase = sender as Windows.UI.Xaml.Controls.ListViewBase;
195195
_itemsForList.Remove(listViewBase.Items);
196196

197-
listViewBase.ContainerContentChanging -= StretchItemContainerDirectionChanging;
197+
listViewBase.ContainerContentChanging -= ItemContainerStretchDirectionChanging;
198198
listViewBase.ContainerContentChanging -= ItemTemplateContainerContentChanging;
199199
listViewBase.ContainerContentChanging -= ColorContainerContentChanging;
200200
listViewBase.Items.VectorChanged -= ColorItemsVectorChanged;

0 commit comments

Comments
 (0)