Skip to content

Commit 6908878

Browse files
authored
Merge pull request #88 from AvaloniaUtils/fixOnDialogOpenedCalledTwice
Fix DialogHost.OnDialogOpened() called twice
2 parents 5a9678b + 111c0f8 commit 6908878

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DialogHost.Avalonia/DialogHost.axaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,10 @@ public Thickness DialogMargin {
308308
public bool IsOpen {
309309
get => _isOpen;
310310
set {
311-
SetAndRaise(IsOpenProperty, ref _isOpen, value);
312-
IsOpenPropertyChangedCallback(this, value);
311+
if (SetAndRaise(IsOpenProperty, ref _isOpen, value))
312+
{
313+
IsOpenPropertyChangedCallback(this, value);
314+
}
313315
}
314316
}
315317

0 commit comments

Comments
 (0)