整理控件库
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
|
||||
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Automation.Peers;
|
||||
|
||||
namespace WPFluent.Controls;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
|
||||
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
|
||||
namespace WPFluent.Controls;
|
||||
@@ -20,7 +15,7 @@ internal class CardActionAutomationPeer : FrameworkElementAutomationPeer
|
||||
|
||||
protected override AutomationPeer GetLabeledByCore()
|
||||
{
|
||||
if(_owner.Content is UIElement element)
|
||||
if (_owner.Content is UIElement element)
|
||||
{
|
||||
return CreatePeerForElement(element);
|
||||
}
|
||||
@@ -32,17 +27,17 @@ internal class CardActionAutomationPeer : FrameworkElementAutomationPeer
|
||||
{
|
||||
var result = base.GetNameCore() ?? string.Empty;
|
||||
|
||||
if(result == string.Empty)
|
||||
if (result == string.Empty)
|
||||
{
|
||||
result = AutomationProperties.GetName(_owner);
|
||||
}
|
||||
|
||||
if(result == string.Empty && _owner.Content is DependencyObject d)
|
||||
if (result == string.Empty && _owner.Content is DependencyObject d)
|
||||
{
|
||||
result = AutomationProperties.GetName(d);
|
||||
}
|
||||
|
||||
if(result == string.Empty && _owner.Content is string s)
|
||||
if (result == string.Empty && _owner.Content is string s)
|
||||
{
|
||||
result = s;
|
||||
}
|
||||
@@ -52,7 +47,7 @@ internal class CardActionAutomationPeer : FrameworkElementAutomationPeer
|
||||
|
||||
public override object GetPattern(PatternInterface patternInterface)
|
||||
{
|
||||
if(patternInterface == PatternInterface.ItemContainer)
|
||||
if (patternInterface == PatternInterface.ItemContainer)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user