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
- HostingEnvironmentSection.cs
- NativeCompoundFileAPIs.cs
- WebPartPersonalization.cs
- VerticalConnector.xaml.cs
- DecimalConstantAttribute.cs
- XmlSchemaAnnotated.cs
- ToolStripControlHost.cs
- ListenerElementsCollection.cs
- RawStylusActions.cs
- Debug.cs
- odbcmetadatacolumnnames.cs
- MessagePropertyFilter.cs
- OuterGlowBitmapEffect.cs
- Section.cs
- ClrProviderManifest.cs
- CodeAssignStatement.cs
- ECDsaCng.cs
- NavigationPropertyEmitter.cs
- GeometryHitTestResult.cs
- XmlSchemaAttribute.cs
- QilDataSource.cs
- AutomationElementCollection.cs
- ProxyElement.cs
- _TLSstream.cs
- PropertyContainer.cs
- Context.cs
- EndpointBehaviorElement.cs
- PropertyMap.cs
- SafeNativeMethodsCLR.cs
- XmlSchemaComplexContentRestriction.cs
- wgx_sdk_version.cs
- StaticFileHandler.cs
- ArrayEditor.cs
- XsdSchemaFileEditor.cs
- WebPartAuthorizationEventArgs.cs
- FileClassifier.cs
- DbConnectionPoolOptions.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- ConnectionPoolRegistry.cs
- Dump.cs
- LicenseProviderAttribute.cs
- MetaColumn.cs
- KnownBoxes.cs
- AsyncPostBackTrigger.cs
- FileRecordSequence.cs
- MLangCodePageEncoding.cs
- ChannelServices.cs
- ProjectionNode.cs
- CompilerGeneratedAttribute.cs
- CompilationRelaxations.cs
- UnionCqlBlock.cs
- RightsManagementProvider.cs
- ComponentConverter.cs
- TextMetrics.cs
- ContextStaticAttribute.cs
- KeyTimeConverter.cs
- SafeArchiveContext.cs
- LayoutTable.cs
- SourceChangedEventArgs.cs
- SmtpLoginAuthenticationModule.cs
- XmlToDatasetMap.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- AmbientValueAttribute.cs
- QueryCacheEntry.cs
- EntityConnection.cs
- LogStream.cs
- ConfigurationProperty.cs
- CrossContextChannel.cs
- RoutedEventValueSerializer.cs
- AutomationIdentifier.cs
- ResourceIDHelper.cs
- TdsValueSetter.cs
- RelatedView.cs
- SQLGuid.cs
- IDispatchConstantAttribute.cs
- BitmapFrame.cs
- AssemblyAttributesGoHere.cs
- ProjectionRewriter.cs
- ListItem.cs
- ExpressionWriter.cs
- XhtmlBasicObjectListAdapter.cs
- xmlglyphRunInfo.cs
- FormViewDeletedEventArgs.cs
- TextShapeableCharacters.cs
- Stacktrace.cs
- ISO2022Encoding.cs
- TransformerTypeCollection.cs
- EntityTypeEmitter.cs
- FlowDocumentPage.cs
- RegisteredArrayDeclaration.cs
- x509utils.cs
- CommonRemoteMemoryBlock.cs
- DataGridViewEditingControlShowingEventArgs.cs
- WebRequestModulesSection.cs
- MultiTouchSystemGestureLogic.cs
- ServiceHandle.cs
- ThemeableAttribute.cs
- DataGridViewControlCollection.cs
- SimpleApplicationHost.cs
- FSWPathEditor.cs