Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Automation / Peers / HyperlinkAutomationPeer.cs / 1 / HyperlinkAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: HyperlinkAutomationPeer.cs // // Description: Automation peer for hyperlink // //--------------------------------------------------------------------------- using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; namespace System.Windows.Automation.Peers { /// public class HyperlinkAutomationPeer : TextElementAutomationPeer, IInvokeProvider { /// public HyperlinkAutomationPeer(Hyperlink owner) : base(owner) { } ////// /// /// ///public override object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.Invoke) { return this; } return null; } //Default Automation properties /// protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Hyperlink; } /// /// /// protected override string GetNameCore() { string name = base.GetNameCore(); if (name == string.Empty) { Hyperlink owner = (Hyperlink)Owner; name = owner.Text; if (name == null) name = string.Empty; } return name; } /// override protected string GetClassNameCore() { return "Hyperlink"; } ////// override protected bool IsControlElementCore() { return true; } //Invoke Pattern implementation void IInvokeProvider.Invoke() { if (!IsEnabled()) throw new ElementNotEnabledException(); Hyperlink owner = (Hyperlink)Owner; owner.DoClick(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: HyperlinkAutomationPeer.cs // // Description: Automation peer for hyperlink // //--------------------------------------------------------------------------- using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; namespace System.Windows.Automation.Peers { /// public class HyperlinkAutomationPeer : TextElementAutomationPeer, IInvokeProvider { /// public HyperlinkAutomationPeer(Hyperlink owner) : base(owner) { } ////// /// /// /// ///public override object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.Invoke) { return this; } return null; } //Default Automation properties /// protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Hyperlink; } /// /// /// protected override string GetNameCore() { string name = base.GetNameCore(); if (name == string.Empty) { Hyperlink owner = (Hyperlink)Owner; name = owner.Text; if (name == null) name = string.Empty; } return name; } /// override protected string GetClassNameCore() { return "Hyperlink"; } ////// override protected bool IsControlElementCore() { return true; } //Invoke Pattern implementation void IInvokeProvider.Invoke() { if (!IsEnabled()) throw new ElementNotEnabledException(); Hyperlink owner = (Hyperlink)Owner; owner.DoClick(); } } } // 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
- ComponentChangingEvent.cs
- DataSourceNameHandler.cs
- Label.cs
- WindowsFormsHostPropertyMap.cs
- SettingsSection.cs
- wmiprovider.cs
- RegexCode.cs
- SplitterEvent.cs
- PartialTrustHelpers.cs
- StringPropertyBuilder.cs
- RoleManagerSection.cs
- BitmapCodecInfoInternal.cs
- Token.cs
- _LoggingObject.cs
- Formatter.cs
- SizeF.cs
- DropShadowEffect.cs
- XmlJsonReader.cs
- ListDataBindEventArgs.cs
- ThreadPool.cs
- Adorner.cs
- StylusButton.cs
- TextBreakpoint.cs
- ProfileParameter.cs
- ByeOperationAsyncResult.cs
- ServerValidateEventArgs.cs
- XPathNodeHelper.cs
- SchemaImporterExtensionElementCollection.cs
- FileDialogCustomPlaces.cs
- EnvironmentPermission.cs
- xmlglyphRunInfo.cs
- UIElementAutomationPeer.cs
- SymbolTable.cs
- PasswordPropertyTextAttribute.cs
- EntityDataSourceUtil.cs
- Marshal.cs
- HexParser.cs
- SR.Designer.cs
- DirectoryObjectSecurity.cs
- BaseCodeDomTreeGenerator.cs
- DrawingAttributesDefaultValueFactory.cs
- StylusOverProperty.cs
- RangeEnumerable.cs
- ContainsRowNumberChecker.cs
- EntityDataSourceViewSchema.cs
- Asn1IntegerConverter.cs
- DbConnectionPoolGroupProviderInfo.cs
- BufferedStream.cs
- GridItem.cs
- XmlBinaryReader.cs
- Utils.cs
- SystemWebCachingSectionGroup.cs
- EventProperty.cs
- ErrorTolerantObjectWriter.cs
- ContentPresenter.cs
- EditorZoneDesigner.cs
- XmlWellformedWriter.cs
- HMACSHA512.cs
- DataServiceProviderMethods.cs
- UrlPath.cs
- PtsHelper.cs
- SchemaMapping.cs
- SafeTimerHandle.cs
- ShapingEngine.cs
- ButtonFieldBase.cs
- BaseUriHelper.cs
- XPathNode.cs
- DriveInfo.cs
- PropertyPathConverter.cs
- WebServiceHandlerFactory.cs
- TrackingDataItem.cs
- DeploymentSection.cs
- EntityDataSourceStatementEditorForm.cs
- ButtonDesigner.cs
- StylusLogic.cs
- XmlChoiceIdentifierAttribute.cs
- RuntimeArgumentHandle.cs
- TextBounds.cs
- DesignerTextViewAdapter.cs
- LockRecoveryTask.cs
- InternalPermissions.cs
- ApplicationDirectory.cs
- SafeRightsManagementHandle.cs
- EdmPropertyAttribute.cs
- BufferedStream.cs
- InstancePersistenceCommand.cs
- SqlException.cs
- CollectionType.cs
- DbConnectionOptions.cs
- PropertyMapper.cs
- CatalogZoneBase.cs
- elementinformation.cs
- QueueProcessor.cs
- COAUTHINFO.cs
- WebPartTransformer.cs
- WebEventTraceProvider.cs
- SafeViewOfFileHandle.cs
- CopyNodeSetAction.cs
- RayHitTestParameters.cs
- LogEntryUtils.cs