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
- PrivilegeNotHeldException.cs
- VectorAnimationUsingKeyFrames.cs
- Pair.cs
- ResizingMessageFilter.cs
- Helpers.cs
- HttpListener.cs
- StateInitializationDesigner.cs
- Brush.cs
- URL.cs
- BamlRecords.cs
- SspiSafeHandles.cs
- TaskScheduler.cs
- PasswordPropertyTextAttribute.cs
- FontNamesConverter.cs
- ReadOnlyTernaryTree.cs
- BinaryWriter.cs
- IsolatedStorage.cs
- JournalEntryStack.cs
- DesignerToolStripControlHost.cs
- ExpressionBindings.cs
- WebConvert.cs
- CommandDevice.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- FixedHighlight.cs
- ProcessThreadCollection.cs
- CapabilitiesUse.cs
- CodeMemberField.cs
- _HeaderInfoTable.cs
- DelegateSerializationHolder.cs
- JsonDeserializer.cs
- FileDialogCustomPlacesCollection.cs
- StreamInfo.cs
- PresentationAppDomainManager.cs
- NotifyParentPropertyAttribute.cs
- DesignColumnCollection.cs
- CompensationExtension.cs
- TypedReference.cs
- EventHandlers.cs
- NullableDecimalMinMaxAggregationOperator.cs
- PointConverter.cs
- ToolStripSeparatorRenderEventArgs.cs
- ImmutableDispatchRuntime.cs
- ISAPIRuntime.cs
- HyperLinkField.cs
- BaseAppDomainProtocolHandler.cs
- SqlProvider.cs
- ToolZone.cs
- EnvelopeVersion.cs
- UnknownWrapper.cs
- IxmlLineInfo.cs
- LinkUtilities.cs
- WindowsScrollBar.cs
- SqlNamer.cs
- TaskHelper.cs
- RuleSettings.cs
- ProcessModuleDesigner.cs
- ErrorEventArgs.cs
- CategoryGridEntry.cs
- ToolStripPanelRenderEventArgs.cs
- ImageClickEventArgs.cs
- PerformanceCounterTraceRecord.cs
- RequestResizeEvent.cs
- XMLUtil.cs
- DelegateSerializationHolder.cs
- ParallelRangeManager.cs
- ClientScriptManagerWrapper.cs
- LongValidatorAttribute.cs
- AuthenticationConfig.cs
- Speller.cs
- RightsManagementEncryptedStream.cs
- CapiNative.cs
- TraceContextRecord.cs
- DesignerAttribute.cs
- SeverityFilter.cs
- ListItem.cs
- TrueReadOnlyCollection.cs
- SafeProcessHandle.cs
- Version.cs
- HttpConfigurationContext.cs
- StreamGeometry.cs
- ApplicationGesture.cs
- GridLengthConverter.cs
- CodeGenerator.cs
- ValidatorUtils.cs
- DocumentsTrace.cs
- TransactionScopeDesigner.cs
- ReferentialConstraint.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- RSAPKCS1SignatureDeformatter.cs
- HttpStreamXmlDictionaryWriter.cs
- BlockUIContainer.cs
- AnnotationStore.cs
- SystemGatewayIPAddressInformation.cs
- TakeOrSkipWhileQueryOperator.cs
- ServicesUtilities.cs
- ConversionContext.cs
- ByteAnimationUsingKeyFrames.cs
- EventProviderWriter.cs
- XmlHierarchicalEnumerable.cs
- EventRouteFactory.cs