Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / TableCellAutomationPeer.cs / 1 / 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; } return null; } ////// /// 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
- DataColumn.cs
- ExplicitDiscriminatorMap.cs
- DecimalSumAggregationOperator.cs
- DataGridRowAutomationPeer.cs
- InvalidPipelineStoreException.cs
- ClientSettingsSection.cs
- SiteMapDesignerDataSourceView.cs
- SizeConverter.cs
- ObjectDataSourceStatusEventArgs.cs
- StyleCollection.cs
- TableRow.cs
- XmlSchemaDatatype.cs
- XmlTextAttribute.cs
- ProxyWebPartManager.cs
- TableDetailsCollection.cs
- BamlMapTable.cs
- WindowHideOrCloseTracker.cs
- DataSourceCacheDurationConverter.cs
- DateTimeUtil.cs
- VisualTreeHelper.cs
- ClientRolePrincipal.cs
- ListBoxItemAutomationPeer.cs
- OutKeywords.cs
- BitmapImage.cs
- JavaScriptObjectDeserializer.cs
- X509Certificate2.cs
- WebDisplayNameAttribute.cs
- XmlDataSourceView.cs
- BoundField.cs
- MultiView.cs
- Win32MouseDevice.cs
- SharedStatics.cs
- WarningException.cs
- PartialTrustHelpers.cs
- RegisteredDisposeScript.cs
- ItemContainerProviderWrapper.cs
- FlowLayout.cs
- AuthorizationSection.cs
- SurrogateSelector.cs
- ErrorWrapper.cs
- CqlErrorHelper.cs
- SessionEndingEventArgs.cs
- MailBnfHelper.cs
- ColorTransform.cs
- HwndStylusInputProvider.cs
- FormViewDeletedEventArgs.cs
- ComponentConverter.cs
- CommonRemoteMemoryBlock.cs
- TraceUtility.cs
- InputGestureCollection.cs
- XmlWellformedWriterHelpers.cs
- ZoneMembershipCondition.cs
- EntityContainerEntitySetDefiningQuery.cs
- HtmlLabelAdapter.cs
- PropertyMappingExceptionEventArgs.cs
- AttributeXamlType.cs
- TranslateTransform3D.cs
- ExpressionParser.cs
- ComAdminWrapper.cs
- RepeaterItemEventArgs.cs
- ControlEvent.cs
- RecognizerStateChangedEventArgs.cs
- Line.cs
- RowVisual.cs
- SettingsAttributes.cs
- DesignerTransactionCloseEvent.cs
- DeploymentExceptionMapper.cs
- XDeferredAxisSource.cs
- SafeArrayRankMismatchException.cs
- CustomCategoryAttribute.cs
- SystemFonts.cs
- GeometryCollection.cs
- PathTooLongException.cs
- DataObjectMethodAttribute.cs
- HMACSHA256.cs
- TypeExtension.cs
- DataTableCollection.cs
- TakeOrSkipQueryOperator.cs
- InfocardExtendedInformationCollection.cs
- StreamReader.cs
- CrossAppDomainChannel.cs
- XmlSchemaInclude.cs
- NodeFunctions.cs
- DebugView.cs
- HasRunnableWorkflowEvent.cs
- WeakHashtable.cs
- NameSpaceExtractor.cs
- Point4DValueSerializer.cs
- GeometryGroup.cs
- HtmlEncodedRawTextWriter.cs
- IImplicitResourceProvider.cs
- SamlSubject.cs
- AtomMaterializer.cs
- MessageBox.cs
- Attachment.cs
- SyndicationContent.cs
- DecoderReplacementFallback.cs
- StreamGeometryContext.cs
- CaseStatement.cs
- SessionSwitchEventArgs.cs