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
- ProviderCommandInfoUtils.cs
- AutomationEvent.cs
- GridViewUpdateEventArgs.cs
- NetPipeSection.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- Parser.cs
- Iis7Helper.cs
- SizeAnimationBase.cs
- PersianCalendar.cs
- StrokeCollection2.cs
- WebPartMinimizeVerb.cs
- GenericEnumerator.cs
- SmtpDigestAuthenticationModule.cs
- ItemMap.cs
- ProviderConnectionPointCollection.cs
- DataGridViewSelectedRowCollection.cs
- CompressEmulationStream.cs
- LayoutEvent.cs
- Label.cs
- MaterializeFromAtom.cs
- OdbcReferenceCollection.cs
- InstanceCreationEditor.cs
- MetadataCacheItem.cs
- DeviceContext.cs
- WebPartTracker.cs
- XPathParser.cs
- HtmlTableRow.cs
- WindowsPen.cs
- OleDbReferenceCollection.cs
- AliasedSlot.cs
- ResXFileRef.cs
- ListViewHitTestInfo.cs
- IISMapPath.cs
- BuildManager.cs
- ListDictionaryInternal.cs
- XmlSchemaSubstitutionGroup.cs
- BoundColumn.cs
- BooleanProjectedSlot.cs
- Barrier.cs
- AsymmetricSignatureFormatter.cs
- PropertyItemInternal.cs
- SingleTagSectionHandler.cs
- Bind.cs
- XmlTextEncoder.cs
- FormatConvertedBitmap.cs
- HttpCookie.cs
- XmlKeywords.cs
- WpfPayload.cs
- RegexFCD.cs
- SoapExtensionStream.cs
- TypeNameParser.cs
- ZipIOLocalFileHeader.cs
- PageCache.cs
- SystemIPGlobalStatistics.cs
- WizardPanel.cs
- sqlstateclientmanager.cs
- SQLStringStorage.cs
- TcpActivation.cs
- ControllableStoryboardAction.cs
- HMACSHA512.cs
- EntitySqlException.cs
- CultureSpecificStringDictionary.cs
- CodeNamespaceImportCollection.cs
- SafeMILHandle.cs
- EntityDataSourceState.cs
- DateTime.cs
- TableHeaderCell.cs
- AutomationAttributeInfo.cs
- SrgsItemList.cs
- CellQuery.cs
- ListViewCancelEventArgs.cs
- Metafile.cs
- XmlSchemaObjectCollection.cs
- CharUnicodeInfo.cs
- TaskExceptionHolder.cs
- XmlComplianceUtil.cs
- SortFieldComparer.cs
- MatrixCamera.cs
- InstalledFontCollection.cs
- Cloud.cs
- PackageRelationshipCollection.cs
- BaseResourcesBuildProvider.cs
- EventSource.cs
- EntityDataSource.cs
- SchemaComplexType.cs
- EdmMember.cs
- AutomationPattern.cs
- Events.cs
- BuildProvidersCompiler.cs
- CalendarItem.cs
- HTTPNotFoundHandler.cs
- FormDocumentDesigner.cs
- MaterialGroup.cs
- PropertyTabChangedEvent.cs
- ReflectionPermission.cs
- TextViewBase.cs
- ServiceModelTimeSpanValidator.cs
- SiteMapHierarchicalDataSourceView.cs
- PageParser.cs
- printdlgexmarshaler.cs