feat: clean up warnings.
This commit is contained in:
@@ -6,10 +6,8 @@ using Avalonia.Controls;
|
||||
using Avalonia.Controls.Metadata;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Controls.Templates;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
using Irihi.Avalonia.Shared.Contracts;
|
||||
|
||||
@@ -145,7 +143,7 @@ public class MultiComboBox: SelectingItemsControl, IInnerContentControl
|
||||
PseudoClasses.Set(PC_Empty, SelectedItems?.Count == 0);
|
||||
}
|
||||
|
||||
private void OnBackgroundPointerPressed(object sender, PointerPressedEventArgs e)
|
||||
private void OnBackgroundPointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
SetCurrentValue(IsDropDownOpenProperty, !IsDropDownOpen);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Windows.Input;
|
||||
using Avalonia;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Mixins;
|
||||
using Avalonia.Input;
|
||||
|
||||
@@ -6,8 +6,6 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.TextFormatting;
|
||||
using Irihi.Avalonia.Shared.Common;
|
||||
using Irihi.Avalonia.Shared.Helpers;
|
||||
|
||||
@@ -16,7 +14,6 @@ namespace Ursa.Controls;
|
||||
[TemplatePart(PartNames.PART_Header, typeof(Control))]
|
||||
public class TreeComboBoxItem: HeaderedItemsControl, ISelectable
|
||||
{
|
||||
private Control? _header;
|
||||
private TreeComboBox? _treeComboBox;
|
||||
public TreeComboBox? Owner => _treeComboBox;
|
||||
|
||||
@@ -58,7 +55,7 @@ public class TreeComboBoxItem: HeaderedItemsControl, ISelectable
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
DoubleTappedEvent.RemoveHandler(OnDoubleTapped, this);
|
||||
_header = e.NameScope.Find<Control>(PartNames.PART_Header);
|
||||
e.NameScope.Find<Control>(PartNames.PART_Header);
|
||||
DoubleTappedEvent.AddHandler(OnDoubleTapped, RoutingStrategies.Tunnel, true, this);
|
||||
}
|
||||
|
||||
@@ -77,7 +74,7 @@ public class TreeComboBoxItem: HeaderedItemsControl, ISelectable
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDoubleTapped(object sender, TappedEventArgs e)
|
||||
private void OnDoubleTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (this.ItemCount <= 0) return;
|
||||
this.SetCurrentValue(IsExpandedProperty, !IsExpanded);
|
||||
@@ -86,8 +83,6 @@ public class TreeComboBoxItem: HeaderedItemsControl, ISelectable
|
||||
|
||||
protected override bool NeedsContainerOverride(object? item, int index, out object? recycleKey)
|
||||
{
|
||||
TreeViewItem t = new TreeViewItem();
|
||||
ComboBox c = new ComboBox();
|
||||
return EnsureParent().NeedsContainerInternal(item, index, out recycleKey);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user