///
        public GridViewItemAutomationPeer(object owner, ListViewAutomationPeer listviewAP)
            : base(owner, listviewAP)
        {
            Invariant.Assert(listviewAP != null);

            _listviewAP = listviewAP;
        }
Exemple #2
0
        /// <summary>
        /// Fire ColumnCount changed event for GridPattern
        /// </summary>
        private void OnColumnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (_oldColumnsCount != _owner.Columns.Count)
            {
                ListViewAutomationPeer peer = UIElementAutomationPeer.FromElement(_listview) as ListViewAutomationPeer;
                Invariant.Assert(peer != null);
                if (peer != null)
                {
                    peer.RaisePropertyChangedEvent(GridPatternIdentifiers.ColumnCountProperty, _oldColumnsCount, _owner.Columns.Count);
                }
            }

            _oldColumnsCount = _owner.Columns.Count;

            AutomationPeer lvPeer = UIElementAutomationPeer.FromElement(_listview);

            if (lvPeer != null)
            {
                List <AutomationPeer> list = lvPeer.GetChildren();
                if (list != null)
                {
                    foreach (AutomationPeer peer in list)
                    {
                        peer.InvalidatePeer();
                    }
                }
            }
        }
Exemple #3
0
        // Token: 0x060026B5 RID: 9909 RVA: 0x000B7DAC File Offset: 0x000B5FAC
        private void OnColumnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (this._oldColumnsCount != this._owner.Columns.Count)
            {
                ListViewAutomationPeer listViewAutomationPeer = UIElementAutomationPeer.FromElement(this._listview) as ListViewAutomationPeer;
                Invariant.Assert(listViewAutomationPeer != null);
                if (listViewAutomationPeer != null)
                {
                    listViewAutomationPeer.RaisePropertyChangedEvent(GridPatternIdentifiers.ColumnCountProperty, this._oldColumnsCount, this._owner.Columns.Count);
                }
            }
            this._oldColumnsCount = this._owner.Columns.Count;
            AutomationPeer automationPeer = UIElementAutomationPeer.FromElement(this._listview);

            if (automationPeer != null)
            {
                List <AutomationPeer> children = automationPeer.GetChildren();
                if (children != null)
                {
                    foreach (AutomationPeer automationPeer2 in children)
                    {
                        automationPeer2.InvalidatePeer();
                    }
                }
            }
        }
        ///
        public GridViewItemAutomationPeer(object owner, ListViewAutomationPeer listviewAP)
            : base(owner, listviewAP)
        {
            Invariant.Assert(owner != null);
            Invariant.Assert(listviewAP != null);

            _item = owner;
            _listviewAP = listviewAP;
        }
Exemple #5
0
        ///
        void IViewAutomationPeer.ItemsChanged(NotifyCollectionChangedEventArgs e)
        {
            ListViewAutomationPeer peer = UIElementAutomationPeer.FromElement(_listview) as ListViewAutomationPeer;

            if (peer != null)
            {
                if (_oldItemsCount != _listview.Items.Count)
                {
                    peer.RaisePropertyChangedEvent(GridPatternIdentifiers.RowCountProperty, _oldItemsCount, _listview.Items.Count);
                }
                _oldItemsCount = _listview.Items.Count;
            }
        }
Exemple #6
0
 /// <summary>Returns a collection of UI Automation providers that represents all the column headers in a table.</summary>
 /// <returns>A collection of UI Automation providers.</returns>
 // Token: 0x060026B0 RID: 9904 RVA: 0x000B7B94 File Offset: 0x000B5D94
 IRawElementProviderSimple[] ITableProvider.GetColumnHeaders()
 {
     if (this._owner.HeaderRowPresenter != null)
     {
         List <IRawElementProviderSimple> list = new List <IRawElementProviderSimple>(this._owner.HeaderRowPresenter.ActualColumnHeaders.Count);
         ListViewAutomationPeer           listViewAutomationPeer = UIElementAutomationPeer.FromElement(this._listview) as ListViewAutomationPeer;
         if (listViewAutomationPeer != null)
         {
             foreach (UIElement element in this._owner.HeaderRowPresenter.ActualColumnHeaders)
             {
                 AutomationPeer automationPeer = UIElementAutomationPeer.CreatePeerForElement(element);
                 if (automationPeer != null)
                 {
                     list.Add(ElementProxy.StaticWrap(automationPeer, listViewAutomationPeer));
                 }
             }
         }
         return(list.ToArray());
     }
     return(new IRawElementProviderSimple[0]);
 }
Exemple #7
0
        /// <summary>
        /// Collection of column headers
        /// </summary>
        IRawElementProviderSimple[] ITableProvider.GetColumnHeaders()
        {
            if (_owner.HeaderRowPresenter != null)
            {
                List <IRawElementProviderSimple> array  = new List <IRawElementProviderSimple>(_owner.HeaderRowPresenter.ActualColumnHeaders.Count);
                ListViewAutomationPeer           lvpeer = UIElementAutomationPeer.FromElement(_listview) as ListViewAutomationPeer;

                if (lvpeer != null)
                {
                    foreach (UIElement e in _owner.HeaderRowPresenter.ActualColumnHeaders)
                    {
                        AutomationPeer peer = UIElementAutomationPeer.CreatePeerForElement(e);
                        if (peer != null)
                        {
                            array.Add(ElementProxy.StaticWrap(peer, lvpeer));
                        }
                    }
                }
                return(array.ToArray());
            }

            return(new IRawElementProviderSimple[0]);
        }
 public GridViewItemAutomationPeer(Object owner, ListViewAutomationPeer listviewAP) : base(default(Object), default(SelectorAutomationPeer))
 {
 }
Exemple #9
0
 ///
 internal GridViewCellAutomationPeer(TextBlock owner, ListViewAutomationPeer parent)
     : base(owner)
 {
     Invariant.Assert(parent != null);
     _listviewAP = parent;
 }
        //-------------------------------------------------------------------
        //
        //  Accessibility
        //
        //-------------------------------------------------------------------

        #region Accessibility

        /// <summary>
        /// Creates AutomationPeer (<see cref="UIElement.OnCreateAutomationPeer"/>)
        /// </summary>
        protected override AutomationPeer OnCreateAutomationPeer()
        {
            ListViewAutomationPeer lvPeer = new ListViewAutomationPeer(this);
            if (lvPeer != null && View != null)
            {
                lvPeer.ViewAutomationPeer = View.GetAutomationPeer(this);
            }

            return lvPeer;
        }
 /// 
 internal GridViewCellAutomationPeer(TextBlock owner, ListViewAutomationPeer parent)
     : base(owner) 
 { 
     Invariant.Assert(parent != null);
     _listviewAP = parent; 
 }
 public GridViewItemAutomationPeer(Object owner, ListViewAutomationPeer listviewAP) : base (default(Object), default(SelectorAutomationPeer))
 {
 }
Exemple #13
0
        ItemAutomationPeer IViewAutomationPeer.CreateItemAutomationPeer(object item)
        {
            ListViewAutomationPeer lvAP = UIElementAutomationPeer.FromElement(_listview) as ListViewAutomationPeer;

            return(new GridViewItemAutomationPeer(item, lvAP));
        }
 // Token: 0x060026C8 RID: 9928 RVA: 0x000B8024 File Offset: 0x000B6224
 internal GridViewCellAutomationPeer(ContentPresenter owner, ListViewAutomationPeer parent) : base(owner)
 {
     Invariant.Assert(parent != null);
     this._listviewAP = parent;
 }