Skip to content

Commit

Permalink
Use StyledElementAction instead of the Action class
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Dec 30, 2024
1 parent 70b6af4 commit 393dc8f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Adds a specified <see cref="AddClassAction.ClassName"/> to the <see cref="StyledElement.Classes"/> collection when invoked.
/// </summary>
public class AddClassAction : Avalonia.Xaml.Interactivity.Action
public class AddClassAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
/// <summary>
/// Identifies the <seealso cref="ClassName"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// An action that will change a specified Avalonia property to a specified value when invoked.
/// </summary>
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
public class ChangeAvaloniaPropertyAction : Avalonia.Xaml.Interactivity.Action
public class ChangeAvaloniaPropertyAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
/// <summary>
/// Identifies the <seealso cref="TargetProperty"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
///
/// </summary>
public class CloseNotificationAction : Avalonia.Xaml.Interactivity.Action
public class CloseNotificationAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
/// <summary>
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Focuses the associated or target control when executed.
/// </summary>
public class FocusControlAction : Avalonia.Xaml.Interactivity.Action
public class FocusControlAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
/// <summary>
/// Identifies the <seealso cref="TargetControl"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// An action that displays a <see cref="Popup"/> for the associated control when executed.
/// </summary>
/// <remarks>If the associated control is of type <see cref="Control"/> than popup inherits control <see cref="StyledElement.DataContext"/>.</remarks>
public class PopupAction : Avalonia.Xaml.Interactivity.Action
public class PopupAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
private Popup? _popup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Removes a specified <see cref="RemoveClassAction.ClassName"/> from <see cref="StyledElement.Classes"/> collection when invoked.
/// </summary>
public class RemoveClassAction : Avalonia.Xaml.Interactivity.Action
public class RemoveClassAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
/// <summary>
/// Identifies the <seealso cref="ClassName"/> avalonia property.
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions/Core/CallMethodAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// An action that calls a method on a specified object when invoked.
/// </summary>
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
public class CallMethodAction : Avalonia.Xaml.Interactivity.Action
public class CallMethodAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
private Type? _targetObjectType;
private readonly List<MethodDescriptor> _methodDescriptors = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// An action that will change a specified property to a specified value when invoked.
/// </summary>
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
public class ChangePropertyAction : Avalonia.Xaml.Interactivity.Action
public class ChangePropertyAction : Avalonia.Xaml.Interactivity.StyledElementAction
{
private static readonly char[] s_trimChars = ['(', ')'];
private static readonly char[] s_separator = ['.'];
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions/Core/InvokeCommandAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// <summary>
/// Executes a specified <see cref="System.Windows.Input.ICommand"/> when invoked.
/// </summary>
public class InvokeCommandAction : Interactivity.Action
public class InvokeCommandAction : Interactivity.StyledElementAction
{
/// <summary>
/// Identifies the <seealso cref="Command"/> avalonia property.
Expand Down
2 changes: 1 addition & 1 deletion tests/Avalonia.Xaml.Interactivity.UnitTests/StubAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Avalonia.Xaml.Interactivity.UnitTests;

public class StubAction(object? returnValue) : Avalonia.Xaml.Interactivity.Action
public class StubAction(object? returnValue) : Avalonia.Xaml.Interactivity.StyledElementAction
{
public StubAction() : this(null)
{
Expand Down

0 comments on commit 393dc8f

Please sign in to comment.