예제 #1
0
        /// <summary>
        /// Provides initialization for base class values when called by the constructor
        /// of a derived class.
        /// </summary>
        /// <param name="item">The item to create the automation peer for.</param>
        /// <returns>The item automation peer.</returns>
        protected override ItemAutomationPeer CreateItemAutomationPeer(object item)
        {
            ItemAutomationPeer peer    = null;
            UIElement          element = item as UIElement;

            if (element != null)
            {
                peer = FrameworkElementAutomationPeer.CreatePeerForElement(element) as ItemAutomationPeer;
            }
            return(peer);
        }
예제 #2
0
        protected override ItemAutomationPeer CreateItemAutomationPeer(object item)
        {
            ItemAutomationPeer peer = CategoryContainerAutomationPeer.CreateItemAutomationPeer(
                item as ModelCategoryEntry,
                _control.ItemContainerGenerator.ContainerFromItem(item) as CiderCategoryContainer,
                this);

            //Add each item to the children's list
            _children.Add(peer);

            return(peer);
        }
예제 #3
0
 internal static UIElement GetWrapper(this ItemAutomationPeer automationPeer)
 {
     return((UIElement)getWrapperMethodInfo.Invoke(automationPeer, null));
 }
예제 #4
0
 internal static AutomationPeer GetWrapperPeer(this ItemAutomationPeer automationPeer)
 {
     return((AutomationPeer)getWrapperPeerMethodInfo.Invoke(automationPeer, null));
 }