Ejemplo n.º 1
0
        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");
            }
        }
Ejemplo n.º 2
0
        void RaiseWindowClosedEvent(string displayString)
        {
            AutomationPeer autPeer = this;

            autPeer.RaiseNotificationEvent(AutomationNotificationKind.Other, AutomationNotificationProcessing.CurrentThenMostRecent, displayString, "InfoBarClosedActivityId");
            if (AutomationPeer.ListenerExists(AutomationEvents.WindowClosed))
            {
                RaiseAutomationEvent(AutomationEvents.WindowClosed);
            }
        }
Ejemplo n.º 3
0
 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());
     }
 }
Ejemplo n.º 4
0
 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());
     }
 }