internal void RaiseAutomationFocusEvent(DateTime currentDate) { CalendarSelectableCellnfoAutomationPeer infoPeer = this.GetOrCreatePeerFromDateTime(currentDate); if (infoPeer != null) { infoPeer.RaiseAutomationEvent(AutomationEvents.AutomationFocusChanged); } }
internal void RaiseSelectionEvents(CurrentSelectionChangedEventArgs args) { if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected)) { CalendarSelectableCellnfoAutomationPeer peer = GetOrCreatePeerFromDateTime(args.NewSelection); if (peer != null) { peer.RaiseAutomationEvent(AutomationEvents.AutomationFocusChanged); peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementSelected); } } if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementAddedToSelection)) { CalendarSelectableCellnfoAutomationPeer peer = GetOrCreatePeerFromDateTime(args.NewSelection); if (peer != null) { peer.RaiseAutomationEvent(AutomationEvents.AutomationFocusChanged); peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementAddedToSelection); } } }