Skip to content

Commit

Permalink
Merge pull request #291 from rmadsen-ks/281_ExceptionThrownByUIAutoma…
Browse files Browse the repository at this point in the history
…tion

281 floating window host: UI automation name
  • Loading branch information
Dirkster99 committed Aug 9, 2021
2 parents 8a92a07 + afda69f commit b83d6d6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
Expand Down Expand Up @@ -768,6 +769,7 @@ protected override HandleRef BuildWindowCore(HandleRef hwndParent)
});

_rootPresenter = new Border { Child = new AdornerDecorator { Child = Content }, Focusable = true };
AutomationProperties.SetName(_rootPresenter, "FloatingWindowHost");
_rootPresenter.SetBinding(Border.BackgroundProperty, new Binding(nameof(Background)) { Source = _owner });
_wpfContentHost.RootVisual = _rootPresenter;
_manager = _owner.Model.Root.Manager;
Expand Down Expand Up @@ -810,4 +812,4 @@ private void Content_SizeChanged(object sender, SizeChangedEventArgs e)

#endregion Internal Classes
}
}
}

0 comments on commit b83d6d6

Please sign in to comment.