Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / TableCellAutomationPeer.cs / 1305600 / TableCellAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: TableCellAutomationPeer.cs // // Description: Automation peer for TableCell // //--------------------------------------------------------------------------- using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; namespace System.Windows.Automation.Peers { /// public class TableCellAutomationPeer : TextElementAutomationPeer, IGridItemProvider { ////// Constructor. /// /// Owner of the AutomationPeer. public TableCellAutomationPeer(TableCell owner) : base(owner) { } ////// public override object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.GridItem) { return this; } else { return base.GetPattern(patternInterface); } } ////// /// protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Custom; } ////// /// protected override string GetLocalizedControlTypeCore() { return "cell"; } ////// /// protected override string GetClassNameCore() { return "TableCell"; } ////// /// protected override bool IsControlElementCore() { return true; } ////// /// protected override bool IsContentElementCore() { return true; } ////// /// Raises property changed events in response to column span change. /// internal void OnColumnSpanChanged(int oldValue, int newValue) { RaisePropertyChangedEvent(GridItemPatternIdentifiers.ColumnSpanProperty, oldValue, newValue); } ////// Raises property changed events in response to row span change. /// internal void OnRowSpanChanged(int oldValue, int newValue) { RaisePropertyChangedEvent(GridItemPatternIdentifiers.RowSpanProperty, oldValue, newValue); } //------------------------------------------------------------------- // // IGridProvider Members // //------------------------------------------------------------------- #region IGridItemProvider Members ////// Returns the current row that the item is located at. /// int IGridItemProvider.Row { get { return ((TableCell)Owner).RowIndex; } } ////// Returns the current column that the item is located at. /// int IGridItemProvider.Column { get { return ((TableCell)Owner).ColumnIndex; } } ////// Return the current number of rows that the item spans. /// int IGridItemProvider.RowSpan { get { return ((TableCell)Owner).RowSpan; } } ////// Return the current number of columns that the item spans. /// int IGridItemProvider.ColumnSpan { get { return ((TableCell)Owner).ColumnSpan; } } ////// Returns the container that maintains the grid layout for the item. /// IRawElementProviderSimple IGridItemProvider.ContainingGrid { get { if ((TableCell)Owner != null) { return ProviderFromPeer(CreatePeerForElement(((TableCell)Owner).Table)); } else { return null; } } } #endregion IGridItemProvider Members } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmptyElement.cs
- OleStrCAMarshaler.cs
- WsatAdminException.cs
- XmlSerializerAssemblyAttribute.cs
- HiddenFieldPageStatePersister.cs
- WaitHandle.cs
- DriveNotFoundException.cs
- ToolStripActionList.cs
- BooleanFunctions.cs
- SecurityPermission.cs
- BinaryConverter.cs
- FocusTracker.cs
- BuildProviderCollection.cs
- Win32Native.cs
- WorkItem.cs
- StaticDataManager.cs
- QuestionEventArgs.cs
- Stackframe.cs
- CheckBoxPopupAdapter.cs
- ToolTipService.cs
- ProjectionRewriter.cs
- SuppressIldasmAttribute.cs
- EndpointIdentityConverter.cs
- StandardBindingElement.cs
- StandardBindingCollectionElement.cs
- AlignmentXValidation.cs
- GlobalizationSection.cs
- ReaderContextStackData.cs
- PtsContext.cs
- WebBrowserEvent.cs
- DataControlField.cs
- KeyInterop.cs
- ExceptionUtil.cs
- MemberMaps.cs
- MenuCommand.cs
- TypeNameHelper.cs
- WeakReferenceKey.cs
- StringReader.cs
- mactripleDES.cs
- CqlParserHelpers.cs
- XsltQilFactory.cs
- BuildProviderCollection.cs
- DataGridTextBox.cs
- DataControlReferenceCollection.cs
- DtrList.cs
- WrapPanel.cs
- SecurityException.cs
- NetDataContractSerializer.cs
- ElementNotAvailableException.cs
- BuildManager.cs
- WebPartZone.cs
- SpeechUI.cs
- Int32Animation.cs
- LogicalExpr.cs
- ColorConvertedBitmap.cs
- NullRuntimeConfig.cs
- Camera.cs
- ConnectionPoolRegistry.cs
- MenuItemCollection.cs
- SocketException.cs
- DataReaderContainer.cs
- Root.cs
- ZoneButton.cs
- Component.cs
- CrossAppDomainChannel.cs
- KeyboardDevice.cs
- TextPattern.cs
- WindowsTokenRoleProvider.cs
- Processor.cs
- RectangleGeometry.cs
- ECDiffieHellmanCng.cs
- IUnknownConstantAttribute.cs
- CreateUserWizardStep.cs
- SafeLocalAllocation.cs
- remotingproxy.cs
- ByteAnimationBase.cs
- StorageScalarPropertyMapping.cs
- StandardCommands.cs
- ManipulationDevice.cs
- EntityDesignerUtils.cs
- GridToolTip.cs
- TabControlEvent.cs
- GridViewSelectEventArgs.cs
- WsatConfiguration.cs
- SolidBrush.cs
- PropertyMapper.cs
- SimpleTypesSurrogate.cs
- WinEventWrap.cs
- ZipIOCentralDirectoryFileHeader.cs
- TimeStampChecker.cs
- LinkClickEvent.cs
- FormsAuthentication.cs
- CodeGotoStatement.cs
- SQLConvert.cs
- RenderingBiasValidation.cs
- DrawingVisualDrawingContext.cs
- SoapMessage.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- ReadOnlyCollectionBuilder.cs
- ResourceLoader.cs