Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / DataGridRowHeaderAutomationPeer.cs / 1305600 / DataGridRowHeaderAutomationPeer.cs
using System; using System.Collections.Generic; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using MS.Internal; namespace System.Windows.Automation.Peers { ////// AutomationPeer for DataGridRowHeader /// public sealed class DataGridRowHeaderAutomationPeer : ButtonBaseAutomationPeer { #region Constructors ////// AutomationPeer for DataGridRowHeader /// /// DataGridRowHeader public DataGridRowHeaderAutomationPeer(DataGridRowHeader owner) : base(owner) { } #endregion #region AutomationPeer Overrides ////// Gets the control type for the element that is associated with the UI Automation peer. /// ///The control type. protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.HeaderItem; } ////// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, /// differentiates the control represented by this AutomationPeer. /// ///The string that contains the name. protected override string GetClassNameCore() { return Owner.GetType().Name; } ////// Gets a value that specifies whether the element is a content element. /// ///true if the element is a content element; otherwise false protected override bool IsContentElementCore() { return false; } /// override protected bool IsOffscreenCore() { if (!Owner.IsVisible) return true; Rect boundingRect = CalculateVisibleBoundingRect(); return DoubleUtil.AreClose(boundingRect, Rect.Empty) || DoubleUtil.AreClose(boundingRect.Height, 0.0) || DoubleUtil.AreClose(boundingRect.Width, 0.0); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using MS.Internal; namespace System.Windows.Automation.Peers { ////// AutomationPeer for DataGridRowHeader /// public sealed class DataGridRowHeaderAutomationPeer : ButtonBaseAutomationPeer { #region Constructors ////// AutomationPeer for DataGridRowHeader /// /// DataGridRowHeader public DataGridRowHeaderAutomationPeer(DataGridRowHeader owner) : base(owner) { } #endregion #region AutomationPeer Overrides ////// Gets the control type for the element that is associated with the UI Automation peer. /// ///The control type. protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.HeaderItem; } ////// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, /// differentiates the control represented by this AutomationPeer. /// ///The string that contains the name. protected override string GetClassNameCore() { return Owner.GetType().Name; } ////// Gets a value that specifies whether the element is a content element. /// ///true if the element is a content element; otherwise false protected override bool IsContentElementCore() { return false; } /// override protected bool IsOffscreenCore() { if (!Owner.IsVisible) return true; Rect boundingRect = CalculateVisibleBoundingRect(); return DoubleUtil.AreClose(boundingRect, Rect.Empty) || DoubleUtil.AreClose(boundingRect.Height, 0.0) || DoubleUtil.AreClose(boundingRect.Width, 0.0); } #endregion } } // 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
- FunctionQuery.cs
- PrimitiveSchema.cs
- EditorZoneBase.cs
- QueryableDataSourceEditData.cs
- CookieHandler.cs
- Soap12FormatExtensions.cs
- MetaDataInfo.cs
- controlskin.cs
- GridViewPageEventArgs.cs
- PropertyValueChangedEvent.cs
- ByteAnimationUsingKeyFrames.cs
- IssuanceLicense.cs
- BulletChrome.cs
- MetadataArtifactLoaderCompositeFile.cs
- SubMenuStyle.cs
- PauseStoryboard.cs
- HtmlContainerControl.cs
- RijndaelCryptoServiceProvider.cs
- XmlSchemaGroupRef.cs
- ListViewDeleteEventArgs.cs
- DbgCompiler.cs
- ToolStripPanelDesigner.cs
- Menu.cs
- InstanceKeyCompleteException.cs
- FunctionImportElement.cs
- DataTableReader.cs
- ButtonColumn.cs
- DataGridViewUtilities.cs
- Rules.cs
- XPathDescendantIterator.cs
- Byte.cs
- EmptyElement.cs
- ChangeBlockUndoRecord.cs
- UniqueConstraint.cs
- LineSegment.cs
- RolePrincipal.cs
- ParameterCollection.cs
- Walker.cs
- TypeConverterAttribute.cs
- WebMessageEncoderFactory.cs
- OperandQuery.cs
- CheckBoxField.cs
- SoapAttributeAttribute.cs
- CallbackValidator.cs
- SafeSecurityHelper.cs
- CompilerScopeManager.cs
- PropVariant.cs
- TemplateBindingExpressionConverter.cs
- AutomationPatternInfo.cs
- BoolExpressionVisitors.cs
- UpDownEvent.cs
- ClientScriptItem.cs
- ContentFileHelper.cs
- HtmlMobileTextWriter.cs
- DockPanel.cs
- TextParagraph.cs
- Effect.cs
- DeflateStream.cs
- DebugControllerThread.cs
- XsdBuildProvider.cs
- HandleRef.cs
- httpserverutility.cs
- OptimizedTemplateContent.cs
- NamedPipeChannelFactory.cs
- CustomPopupPlacement.cs
- XPathNodePointer.cs
- MarkedHighlightComponent.cs
- QuaternionAnimation.cs
- HTTPNotFoundHandler.cs
- BindingSource.cs
- TextCharacters.cs
- Rules.cs
- _AutoWebProxyScriptEngine.cs
- SchemaDeclBase.cs
- DebugInfoExpression.cs
- TypeLibConverter.cs
- WmlLinkAdapter.cs
- X509InitiatorCertificateClientElement.cs
- CatalogPartCollection.cs
- XmlNodeComparer.cs
- BufferedReadStream.cs
- ArraySubsetEnumerator.cs
- StorageMappingItemLoader.cs
- NativeMethods.cs
- TextServicesLoader.cs
- QueryCacheManager.cs
- ContentIterators.cs
- MergeEnumerator.cs
- SimpleTypesSurrogate.cs
- PngBitmapDecoder.cs
- Publisher.cs
- ExpressionList.cs
- PathFigure.cs
- ColorMap.cs
- ViewStateException.cs
- EncodedStreamFactory.cs
- DataListItemEventArgs.cs
- GZipStream.cs
- MenuItemCollectionEditor.cs
- SchemeSettingElement.cs