Julien Lebosquain
1 day ago
No known key found for this signature in database
GPG Key ID: 1833CAD10ACC46FD
3 changed files with
1 additions and
41 deletions
-
src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs
-
src/Avalonia.Controls/ItemsControl.cs
-
src/Avalonia.Controls/TreeView.cs
|
|
|
@ -1,10 +0,0 @@ |
|
|
|
namespace Avalonia.Controls.Generators |
|
|
|
{ |
|
|
|
public class TreeItemContainerGenerator : ItemContainerGenerator |
|
|
|
{ |
|
|
|
internal TreeItemContainerGenerator(TreeView owner) |
|
|
|
: base(owner) |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -101,11 +101,7 @@ namespace Avalonia.Controls |
|
|
|
/// Gets the <see cref="ItemContainerGenerator"/> for the control.
|
|
|
|
/// </summary>
|
|
|
|
public ItemContainerGenerator ItemContainerGenerator |
|
|
|
{ |
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
get => _itemContainerGenerator ??= CreateItemContainerGenerator(); |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
} |
|
|
|
=> _itemContainerGenerator ??= new ItemContainerGenerator(this); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the items to display.
|
|
|
|
@ -659,20 +655,6 @@ namespace Avalonia.Controls |
|
|
|
ItemCount = ItemsView.Count; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates the <see cref="ItemContainerGenerator"/>
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// This method is only present for backwards compatibility with 0.10.x in order for
|
|
|
|
/// TreeView to be able to create a <see cref="TreeItemContainerGenerator"/>. Can be
|
|
|
|
/// removed in 12.0.
|
|
|
|
/// </remarks>
|
|
|
|
[Obsolete, EditorBrowsable(EditorBrowsableState.Never)] |
|
|
|
private protected virtual ItemContainerGenerator CreateItemContainerGenerator() |
|
|
|
{ |
|
|
|
return new ItemContainerGenerator(this); |
|
|
|
} |
|
|
|
|
|
|
|
internal void AddLogicalChild(Control c) |
|
|
|
{ |
|
|
|
if (!LogicalChildren.Contains(c)) |
|
|
|
|
|
|
|
@ -76,12 +76,6 @@ namespace Avalonia.Controls |
|
|
|
remove => RemoveHandler(SelectingItemsControl.SelectionChangedEvent, value); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the <see cref="TreeItemContainerGenerator"/> for the tree view.
|
|
|
|
/// </summary>
|
|
|
|
public new TreeItemContainerGenerator ItemContainerGenerator => |
|
|
|
(TreeItemContainerGenerator)base.ItemContainerGenerator; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether to automatically scroll to newly selected items.
|
|
|
|
/// </summary>
|
|
|
|
@ -773,12 +767,6 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Obsolete, EditorBrowsable(EditorBrowsableState.Never)] |
|
|
|
private protected override ItemContainerGenerator CreateItemContainerGenerator() |
|
|
|
{ |
|
|
|
return new TreeItemContainerGenerator(this); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Find which node is first in hierarchy.
|
|
|
|
/// </summary>
|
|
|
|
|