Skip to content

Commit 6194f7b

Browse files
committed
Cleanup usings and compilation conditionals
1 parent 0444ecd commit 6194f7b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
// See the LICENSE file in the project root for more information.
44

55
using CommunityToolkit.WinUI.Controls;
6-
#if WINAPPSDK
6+
#if WINUI3
7+
using Microsoft.UI.Xaml.Automation;
78
using Microsoft.UI.Xaml.Automation.Provider;
89
#else
10+
using Windows.UI.Xaml.Automation;
911
using Windows.UI.Xaml.Automation.Provider;
1012
#endif
1113

@@ -47,16 +49,12 @@ private TokenizingTextBox OwningTokenizingTextBox
4749

4850
/// <summary>Sets the value of a control.</summary>
4951
/// <param name="value">The value to set. The provider is responsible for converting the value to the appropriate data type.</param>
50-
/// <exception cref="T:Windows.UI.Xaml.Automation.ElementNotEnabledException">Thrown if the control is in a read-only state.</exception>
52+
/// <exception cref="T:ElementNotEnabledException">Thrown if the control is in a read-only state.</exception>
5153
public void SetValue(string value)
5254
{
5355
if (IsReadOnly)
5456
{
55-
#if NET8_0_OR_GREATER
56-
throw new Microsoft.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} ");
57-
#elif WINDOWS_UWP
58-
throw new Windows.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} ");
59-
#endif
57+
throw new ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} ");
6058
}
6159

6260
this.OwningTokenizingTextBox.Text = value;

0 commit comments

Comments
 (0)