Skip to content

Commit

Permalink
chore: Adjust for WinUI
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Oct 29, 2024
1 parent 2aacc68 commit d876eae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static void OnButtonClick(ContentDialog sender, ContentDialogButtonClickEventArg
await WindowHelper.WaitFor(() => (button = (Button)VisualTreeUtils.FindVisualChildByName(contentDialog, buttonName)) != null);

await WindowHelper.WaitForLoaded(button);
(button.GetAutomationPeer() as ButtonAutomationPeer).Invoke();
(FrameworkElementAutomationPeer.CreatePeerForElement(button) as ButtonAutomationPeer).Invoke();

await WindowHelper.WaitFor(() => closed);

Expand Down Expand Up @@ -580,7 +580,7 @@ public async Task When_Button_Click(ContentDialogButton buttonType)
await WindowHelper.WaitFor(() => (button = (Button)VisualTreeUtils.FindVisualChildByName(contentDialog, buttonName)) != null);

await WindowHelper.WaitForLoaded(button);
(button.GetAutomationPeer() as ButtonAutomationPeer).Invoke();
(FrameworkElementAutomationPeer.CreatePeerForElement(button) as ButtonAutomationPeer).Invoke();

await WindowHelper.WaitFor(() => closed);

Expand Down

0 comments on commit d876eae

Please sign in to comment.