Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- LinqDataSourceSelectEventArgs.cs
- SqlNodeAnnotations.cs
- GridProviderWrapper.cs
- FeatureManager.cs
- XmlNamespaceMapping.cs
- HwndStylusInputProvider.cs
- WindowsClaimSet.cs
- EraserBehavior.cs
- StrokeRenderer.cs
- MultiView.cs
- RewritingValidator.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- DataConnectionHelper.cs
- Page.cs
- SplitterCancelEvent.cs
- ICollection.cs
- BulletChrome.cs
- Icon.cs
- Socket.cs
- TextServicesLoader.cs
- EventData.cs
- FormViewInsertedEventArgs.cs
- ComplexBindingPropertiesAttribute.cs
- designeractionlistschangedeventargs.cs
- Listbox.cs
- ClockGroup.cs
- TokenFactoryCredential.cs
- CodeValidator.cs
- StyleXamlParser.cs
- SafeSystemMetrics.cs
- BasicCommandTreeVisitor.cs
- ContextDataSource.cs
- TextRangeProviderWrapper.cs
- StylusPointPropertyInfoDefaults.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TextRunProperties.cs
- SoundPlayerAction.cs
- SHA1Cng.cs
- HMAC.cs
- RecordManager.cs
- WindowsIPAddress.cs
- EntityDataSourceEntityTypeFilterItem.cs
- SoapAttributeAttribute.cs
- ReceiveParametersContent.cs
- ArgIterator.cs
- XPathNavigatorKeyComparer.cs
- RegexReplacement.cs
- EllipseGeometry.cs
- OneToOneMappingSerializer.cs
- SystemColors.cs
- AppModelKnownContentFactory.cs
- RSAPKCS1KeyExchangeFormatter.cs
- LongMinMaxAggregationOperator.cs
- HttpListenerPrefixCollection.cs
- RenderData.cs
- ContentElementCollection.cs
- DiscoveryOperationContextExtension.cs
- webproxy.cs
- Rules.cs
- MexHttpsBindingCollectionElement.cs
- DeferredReference.cs
- ReflectionUtil.cs
- FacetEnabledSchemaElement.cs
- DecodeHelper.cs
- SiteMapDataSourceView.cs
- SystemParameters.cs
- FieldTemplateFactory.cs
- SqlDataSourceStatusEventArgs.cs
- GradientSpreadMethodValidation.cs
- ThemeDirectoryCompiler.cs
- TaiwanCalendar.cs
- MimeXmlImporter.cs
- EntityCollection.cs
- TracingConnectionListener.cs
- EventLogInternal.cs
- DoneReceivingAsyncResult.cs
- OperationDescriptionCollection.cs
- HealthMonitoringSection.cs
- ClockController.cs
- TableStyle.cs
- SapiRecoInterop.cs
- CommentEmitter.cs
- AtlasWeb.Designer.cs
- Material.cs
- DnsElement.cs
- PriorityQueue.cs
- BuiltInPermissionSets.cs
- InlineUIContainer.cs
- PackageFilter.cs
- ClockController.cs
- NullRuntimeConfig.cs
- Screen.cs
- OperationContractGenerationContext.cs
- SqlServices.cs
- DataConnectionHelper.cs
- TagPrefixAttribute.cs
- ResourceCodeDomSerializer.cs
- ResourceManagerWrapper.cs
- ZipPackagePart.cs
- WindowShowOrOpenTracker.cs