コード例 #1
0
        protected override void SetFocusCore()
        {
            AutomationPeer wrapperPeer = this.GetWrapperPeer();

            if (wrapperPeer != null)
            {
                wrapperPeer.SetFocus();
            }
        }
コード例 #2
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        // 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());
     }
 }
コード例 #4
0
 private void AutomateTextNotification(string message)
 {
     if (peer != null)
     {
         peer.SetFocus();
         peer.RaiseNotificationEvent(
             AutomationNotificationKind.Other,
             AutomationNotificationProcessing.ImportantMostRecent,
             "New notification" + message,
             Guid.NewGuid().ToString());
     }
 }
コード例 #5
0
 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());
     }
 }