private void NotifyButton_Click(object sender, RoutedEventArgs e) { AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(NotifyButton); if (peer != null) { peer.RaiseNotificationEvent(AutomationNotificationKind.ActionCompleted, AutomationNotificationProcessing.ImportantAll, "The notification button has been clicked", "NotifyButtonActivity"); } }
void RaiseWindowClosedEvent(string displayString) { AutomationPeer autPeer = this; autPeer.RaiseNotificationEvent(AutomationNotificationKind.Other, AutomationNotificationProcessing.CurrentThenMostRecent, displayString, "InfoBarClosedActivityId"); if (AutomationPeer.ListenerExists(AutomationEvents.WindowClosed)) { RaiseAutomationEvent(AutomationEvents.WindowClosed); } }
private void AutomateTextNotification(string message) { if (peer != null) { peer.SetFocus(); peer.RaiseNotificationEvent( AutomationNotificationKind.Other, AutomationNotificationProcessing.ImportantMostRecent, StringExtensions.GetLocalized("WindowsCommunityToolkit_InAppNotification_Events_NewNotificationMessage", "/Microsoft.Toolkit.Uwp.UI.Controls/Resources") + message, Guid.NewGuid().ToString()); } }
private void AutomateTextNotification(string message) { if (peer != null) { peer.SetFocus(); peer.RaiseNotificationEvent( AutomationNotificationKind.Other, AutomationNotificationProcessing.ImportantMostRecent, "New notification" + message, Guid.NewGuid().ToString()); } }
private void AutomateTextNotification(string message) { if (peer != null) { peer.SetFocus(); peer.RaiseNotificationEvent( AutomationNotificationKind.Other, AutomationNotificationProcessing.ImportantMostRecent, //StringExtensions.GetLocalized("WindowsCommunityToolkit_InAppNotification_Events_NewNotificationMessage", "/Euro.Uno.Shared.CustomControls.InAppNotification/Resources") + message, "Test: " + message, Guid.NewGuid().ToString()); } }