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
- LinqTreeNodeEvaluator.cs
- ClientRoleProvider.cs
- SynthesizerStateChangedEventArgs.cs
- MoveSizeWinEventHandler.cs
- PreProcessor.cs
- SqlComparer.cs
- XamlToRtfWriter.cs
- FormatSettings.cs
- ExtensionWindow.cs
- DoubleAnimationBase.cs
- initElementDictionary.cs
- AQNBuilder.cs
- BitmapImage.cs
- IteratorDescriptor.cs
- ToolStripDropDownItem.cs
- MasterPageBuildProvider.cs
- ChannelBinding.cs
- Enlistment.cs
- ConstraintManager.cs
- WindowsImpersonationContext.cs
- SqlConnectionFactory.cs
- UserPreference.cs
- AnnotationAdorner.cs
- ConnectionManagementElement.cs
- WsrmTraceRecord.cs
- COM2PropertyPageUITypeConverter.cs
- FieldTemplateFactory.cs
- XmlName.cs
- PtsHost.cs
- HttpProfileGroupBase.cs
- RuntimeConfig.cs
- MatrixTransform.cs
- GZipDecoder.cs
- DataPagerField.cs
- AutomationElement.cs
- RelationshipEndCollection.cs
- Rethrow.cs
- FixedTextBuilder.cs
- CellTreeNode.cs
- TypeReference.cs
- PrivilegedConfigurationManager.cs
- PDBReader.cs
- SafeMemoryMappedFileHandle.cs
- Oid.cs
- XsltSettings.cs
- Timer.cs
- COM2ColorConverter.cs
- SmtpLoginAuthenticationModule.cs
- MimeTypeAttribute.cs
- PassportAuthenticationModule.cs
- DefaultHttpHandler.cs
- SolidColorBrush.cs
- Function.cs
- XmlILStorageConverter.cs
- UnauthorizedWebPart.cs
- Grammar.cs
- XmlValidatingReader.cs
- securitymgrsite.cs
- TextCompositionEventArgs.cs
- ServiceOperation.cs
- OutputCacheSettingsSection.cs
- FileBasedResourceGroveler.cs
- ParserHooks.cs
- StringAnimationUsingKeyFrames.cs
- DBNull.cs
- DataGridCell.cs
- Attachment.cs
- DbConnectionPoolGroup.cs
- FileNotFoundException.cs
- BindingContext.cs
- TextEncodedRawTextWriter.cs
- HttpCookieCollection.cs
- TextParagraph.cs
- DesignUtil.cs
- XPathMultyIterator.cs
- Drawing.cs
- securitycriticaldataformultiplegetandset.cs
- CodeCompiler.cs
- FormsAuthenticationUser.cs
- DayRenderEvent.cs
- CodeDOMProvider.cs
- ImageSourceConverter.cs
- DetailsViewModeEventArgs.cs
- RemoveStoryboard.cs
- Clause.cs
- HtmlDocument.cs
- HttpCookiesSection.cs
- ListSurrogate.cs
- BaseDataBoundControl.cs
- Region.cs
- DeadCharTextComposition.cs
- _TLSstream.cs
- OutgoingWebRequestContext.cs
- RequestResponse.cs
- DBConnectionString.cs
- COM2FontConverter.cs
- Typography.cs
- DrawingGroup.cs
- COM2IDispatchConverter.cs
- DesignerVerb.cs