Skip to content

Commit 9e058d3

Browse files
committed
Update EventTriggerBehavior.cs
1 parent eee0b23 commit 9e058d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Avalonia.Xaml.Interactions/Core/EventTriggerBehavior.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public object? SourceObject
5555
static EventTriggerBehavior()
5656
{
5757
EventNameProperty.Changed.Subscribe(
58-
new AnonymousObserver<AvaloniaPropertyChangedEventArgs<string>>(EventNameChanged));
58+
new AnonymousObserver<AvaloniaPropertyChangedEventArgs<string?>>(EventNameChanged));
5959

6060
SourceObjectProperty.Changed.Subscribe(
6161
new AnonymousObserver<AvaloniaPropertyChangedEventArgs<object?>>(SourceObjectChanged));
6262
}
6363

6464
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
65-
private static void EventNameChanged(AvaloniaPropertyChangedEventArgs<string> e)
65+
private static void EventNameChanged(AvaloniaPropertyChangedEventArgs<string?> e)
6666
{
6767
if (e.Sender is not EventTriggerBehavior behavior)
6868
{
@@ -147,7 +147,7 @@ private void SetResolvedSource(object? newSource)
147147
}
148148

149149
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
150-
private void RegisterEvent(string eventName)
150+
private void RegisterEvent(string? eventName)
151151
{
152152
if (string.IsNullOrEmpty(eventName))
153153
{
@@ -202,7 +202,7 @@ private void RegisterEvent(string eventName)
202202
}
203203

204204
[RequiresUnreferencedCode("This functionality is not compatible with trimming.")]
205-
private void UnregisterEvent(string eventName)
205+
private void UnregisterEvent(string? eventName)
206206
{
207207
if (string.IsNullOrEmpty(eventName))
208208
{

0 commit comments

Comments
 (0)