Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Automation / Peers / ContentElementAutomationPeer.cs / 1 / ContentElementAutomationPeer.cs
//---------------------------------------------------------------------------- // // File: ContentElementAutomationPeer.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Automation element for ContentElements // //--------------------------------------------------------------------------- using System; // Object using System.Collections.Generic; // Listusing System.Windows.Input; // AccessKeyManager using MS.Internal.PresentationCore; // SR namespace System.Windows.Automation.Peers { /// public class ContentElementAutomationPeer : AutomationPeer { /// public ContentElementAutomationPeer(ContentElement owner) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; } /// public ContentElement Owner { get { return _owner; } } /// /// This static helper creates an AutomationPeer for the specified element and /// caches it - that means the created peer is going to live long and shadow the /// element for its lifetime. The peer will be used by Automation to proxy the element, and /// to fire events to the Automation when something happens with the element. /// The created peer is returned from this method and also from subsequent calls to this method /// and public static AutomationPeer CreatePeerForElement(ContentElement element) { if (element == null) { throw new ArgumentNullException("element"); } return element.CreateAutomationPeer(); } /// public static AutomationPeer FromElement(ContentElement element) { if (element == null) { throw new ArgumentNullException("element"); } return element.GetAutomationPeer(); } ///. The type of the peer is determined by the /// virtual callback. If FrameworkContentElement does not /// implement the callback, there will be no peer and this method will return 'null' (in other /// words, there is no such thing as a 'default peer'). /// /// override protected List/// GetChildrenCore() { return null; } /// override public object GetPattern(PatternInterface patternInterface) { return null; } /// /// protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Custom; } ////// /// protected override string GetAutomationIdCore() { return AutomationProperties.GetAutomationId(_owner); } ////// /// protected override string GetNameCore() { return AutomationProperties.GetName(_owner); } ////// /// protected override string GetHelpTextCore() { return AutomationProperties.GetHelpText(_owner); } ////// /// override protected Rect GetBoundingRectangleCore() { return Rect.Empty; } ////// /// override protected bool IsOffscreenCore() { return true; } ////// /// override protected AutomationOrientation GetOrientationCore() { return AutomationOrientation.None; } ////// /// override protected string GetItemTypeCore() { return string.Empty; } ////// /// override protected string GetClassNameCore() { return string.Empty; } ////// /// override protected string GetItemStatusCore() { return string.Empty; } ////// /// override protected bool IsRequiredForFormCore() { return false; } ////// /// override protected bool IsKeyboardFocusableCore() { return Keyboard.IsFocusable(_owner); } ////// /// override protected bool HasKeyboardFocusCore() { return _owner.IsKeyboardFocused; } ////// /// override protected bool IsEnabledCore() { return _owner.IsEnabled; } ////// /// override protected bool IsPasswordCore() { return false; } ////// /// override protected bool IsContentElementCore() { return true; } ////// /// override protected bool IsControlElementCore() { return false; } ////// /// override protected AutomationPeer GetLabeledByCore() { return null; } ////// /// override protected string GetAcceleratorKeyCore() { return string.Empty; } ////// /// override protected string GetAccessKeyCore() { return AccessKeyManager.InternalGetAccessKeyCharacter(_owner); } ////// /// override protected Point GetClickablePointCore() { return new Point(double.NaN, double.NaN); } ////// /// override protected void SetFocusCore() { if (!_owner.Focus()) throw new InvalidOperationException(SR.Get(SRID.SetFocusFailed)); } private ContentElement _owner; } } // 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
- XmlQueryTypeFactory.cs
- SessionState.cs
- WebPartChrome.cs
- ToolStripDropTargetManager.cs
- StylusPlugin.cs
- X509Certificate2.cs
- DrawingGroup.cs
- SoapAttributes.cs
- SimpleApplicationHost.cs
- HtmlInputSubmit.cs
- SmtpReplyReader.cs
- HtmlWindowCollection.cs
- ExtractedStateEntry.cs
- ScopelessEnumAttribute.cs
- CommandHelpers.cs
- ErrorFormatterPage.cs
- documentsequencetextcontainer.cs
- Completion.cs
- ResourceAssociationType.cs
- ElementProxy.cs
- DataGridLength.cs
- NavigationProgressEventArgs.cs
- EncoderFallback.cs
- HTTPNotFoundHandler.cs
- MediaCommands.cs
- PanelContainerDesigner.cs
- RSAOAEPKeyExchangeFormatter.cs
- AdRotator.cs
- SecureEnvironment.cs
- DataObjectCopyingEventArgs.cs
- recordstatefactory.cs
- CodeCompileUnit.cs
- TerminatorSinks.cs
- RequestSecurityTokenForGetBrowserToken.cs
- ImageMapEventArgs.cs
- MemoryMappedFile.cs
- SendingRequestEventArgs.cs
- BitStack.cs
- PointLight.cs
- NativeActivityMetadata.cs
- DataGridViewSortCompareEventArgs.cs
- _NestedMultipleAsyncResult.cs
- LinkLabelLinkClickedEvent.cs
- SqlMethods.cs
- IArgumentProvider.cs
- SharedUtils.cs
- HeaderedContentControl.cs
- SslStream.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- MetadataException.cs
- ColumnHeaderConverter.cs
- ToolStripLocationCancelEventArgs.cs
- SqlDataReader.cs
- MouseGesture.cs
- DrawItemEvent.cs
- PasswordBox.cs
- _LoggingObject.cs
- MouseEvent.cs
- CompModSwitches.cs
- ResourceDisplayNameAttribute.cs
- LinearGradientBrush.cs
- NativeActivityAbortContext.cs
- CookielessHelper.cs
- WorkflowInspectionServices.cs
- RuntimeConfig.cs
- PasswordTextNavigator.cs
- EmptyEnumerator.cs
- NameNode.cs
- ThreadAbortException.cs
- CompoundFileDeflateTransform.cs
- ComponentFactoryHelpers.cs
- PrintingPermission.cs
- ComboBoxItem.cs
- DependentList.cs
- ListView.cs
- FullTextBreakpoint.cs
- CalendarSelectionChangedEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- TextRunProperties.cs
- CursorEditor.cs
- TemplateEditingVerb.cs
- UIElement3DAutomationPeer.cs
- NavigationHelper.cs
- MessageEncodingBindingElementImporter.cs
- WindowsScrollBar.cs
- OleDbTransaction.cs
- XmlDocumentType.cs
- SiteMapProvider.cs
- SqlUdtInfo.cs
- NonVisualControlAttribute.cs
- ParameterEditorUserControl.cs
- DataBindEngine.cs
- PointAnimationUsingKeyFrames.cs
- SqlProviderManifest.cs
- AbsoluteQuery.cs
- Funcletizer.cs
- ListViewDataItem.cs
- ProxyDataContractResolver.cs
- EntitySet.cs
- PeerInvitationResponse.cs