Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / HyperlinkAutomationPeer.cs / 1305600 / 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; } else { return base.GetPattern(patternInterface); } } //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; } else { return base.GetPattern(patternInterface); } } //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
- Wildcard.cs
- Polyline.cs
- Binding.cs
- EntityConnection.cs
- FilterQuery.cs
- SHA512.cs
- QuotedStringWriteStateInfo.cs
- HtmlInputPassword.cs
- XmlUtf8RawTextWriter.cs
- RoleService.cs
- OpCopier.cs
- ListViewUpdateEventArgs.cs
- Clock.cs
- ProcessModule.cs
- AsyncPostBackErrorEventArgs.cs
- CurrentChangingEventArgs.cs
- OleDbDataAdapter.cs
- Win32.cs
- OdbcStatementHandle.cs
- SystemIPInterfaceStatistics.cs
- File.cs
- BaseTemplateBuildProvider.cs
- JsonCollectionDataContract.cs
- UserCancellationException.cs
- WebPartConnection.cs
- PublishLicense.cs
- XmlRawWriter.cs
- PageCatalogPart.cs
- WeakHashtable.cs
- ClientProxyGenerator.cs
- DtdParser.cs
- Parsers.cs
- TypeConverters.cs
- SynchronizedInputPattern.cs
- QueryInterceptorAttribute.cs
- EventPropertyMap.cs
- SizeConverter.cs
- OdbcConnectionStringbuilder.cs
- Events.cs
- SettingsBase.cs
- Composition.cs
- Int32RectValueSerializer.cs
- FrameworkObject.cs
- StringArrayConverter.cs
- AnonymousIdentificationSection.cs
- TextFormatter.cs
- AttachedPropertyBrowsableAttribute.cs
- UpnEndpointIdentityExtension.cs
- PngBitmapEncoder.cs
- ResourceReferenceKeyNotFoundException.cs
- ServiceBehaviorAttribute.cs
- WindowsListViewGroupHelper.cs
- PostBackOptions.cs
- DataGridViewTextBoxEditingControl.cs
- ConfigurationElementCollection.cs
- SocketConnection.cs
- SessionEndingCancelEventArgs.cs
- NetworkAddressChange.cs
- InfoCardClaim.cs
- ValueProviderWrapper.cs
- cryptoapiTransform.cs
- TypeDescriptionProviderAttribute.cs
- URLMembershipCondition.cs
- SQLBoolean.cs
- SqlSupersetValidator.cs
- DatePicker.cs
- DetailsViewPagerRow.cs
- PartManifestEntry.cs
- PartitionedStream.cs
- Table.cs
- GeneratedCodeAttribute.cs
- TableItemPatternIdentifiers.cs
- ParserHooks.cs
- DirectoryNotFoundException.cs
- XmlSerializer.cs
- FixedDocumentPaginator.cs
- GlobalEventManager.cs
- SamlDoNotCacheCondition.cs
- ResourceExpressionBuilder.cs
- BooleanStorage.cs
- HTMLTextWriter.cs
- ConfigXmlWhitespace.cs
- EventSetter.cs
- PerfCounters.cs
- WebContext.cs
- CryptoApi.cs
- PriorityRange.cs
- GridItem.cs
- DataGridViewCellLinkedList.cs
- RepeatInfo.cs
- DataGridViewColumnEventArgs.cs
- NameSpaceEvent.cs
- PropertyDescriptor.cs
- TableLayoutPanelCellPosition.cs
- PrimaryKeyTypeConverter.cs
- ReflectionServiceProvider.cs
- Registry.cs
- ZeroOpNode.cs
- ReadOnlyPropertyMetadata.cs
- OdbcEnvironment.cs