protected override void SetFocusCore()
        {
            AutomationPeer wrapperPeer = this.GetWrapperPeer();

            if (wrapperPeer != null)
            {
                wrapperPeer.SetFocus();
            }
        }
예제 #2
0
        // Set focus to this element...
        private object InContextSetFocus(object unused)
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            peer.SetFocus();
            return(null);
        }
예제 #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());
     }
 }
 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());
     }
 }