Exemple #1
0
 private void FireAsyncContentLoadedEvent()
 {
     if (AutomationPeer.ListenerExists(AutomationEvents.AsyncContentLoaded))
     {
         UserControlAutomationPeer peer = UIElementAutomationPeer.FromElement(this) as UserControlAutomationPeer;
         if (peer != null)
         {
             peer.RaiseAsyncContentLoadedEvent(new AsyncContentLoadedEventArgs(AsyncContentLoadedState.Completed, 100));
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Notify that the content has loaded
 /// </summary>
 private void FireAsyncContentLoadedEvent(AsyncContentLoadedState state)
 {
     if (AutomationPeer.ListenerExists(AutomationEvents.AsyncContentLoaded))
     {
         UserControlAutomationPeer peer = UIElementAutomationPeer.FromElement(this) as UserControlAutomationPeer;
         if (peer != null)
         {
             peer.RaiseAsyncContentLoadedEvent(new AsyncContentLoadedEventArgs(state, state == AsyncContentLoadedState.Beginning ? 0 : 100));
         }
     }
 }