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
- VisualProxy.cs
- RuleRefElement.cs
- XmlProcessingInstruction.cs
- MouseButtonEventArgs.cs
- OptimisticConcurrencyException.cs
- HttpAsyncResult.cs
- Imaging.cs
- Canvas.cs
- cache.cs
- AppDomainCompilerProxy.cs
- StructuredTypeEmitter.cs
- DataObjectAttribute.cs
- SHA1Managed.cs
- MobileControl.cs
- Vertex.cs
- TypeDefinition.cs
- SqlRowUpdatingEvent.cs
- DataView.cs
- SegmentInfo.cs
- HttpClientCertificate.cs
- ReadWriteObjectLock.cs
- SplineKeyFrames.cs
- PageAsyncTaskManager.cs
- ToolStripDropDownMenu.cs
- URLAttribute.cs
- SqlSelectClauseBuilder.cs
- Size3DValueSerializer.cs
- SelectionWordBreaker.cs
- WindowsListView.cs
- BitmapEffectInput.cs
- RawStylusInputCustomDataList.cs
- SharedPersonalizationStateInfo.cs
- PropertyInformation.cs
- RightNameExpirationInfoPair.cs
- IntSecurity.cs
- PointConverter.cs
- DataTemplateSelector.cs
- GlobalizationSection.cs
- TextEditorSelection.cs
- ConstraintCollection.cs
- Object.cs
- DbDeleteCommandTree.cs
- Vector3D.cs
- MemberMaps.cs
- WeakReference.cs
- ScriptBehaviorDescriptor.cs
- BlurEffect.cs
- CodeMemberEvent.cs
- WebServiceClientProxyGenerator.cs
- diagnosticsswitches.cs
- BuildManagerHost.cs
- DataFieldCollectionEditor.cs
- RoutedEventConverter.cs
- CharEntityEncoderFallback.cs
- EncryptedPackageFilter.cs
- CurrentChangedEventManager.cs
- XmlEncoding.cs
- SQLBinary.cs
- PropertyItemInternal.cs
- OrthographicCamera.cs
- AssemblyCacheEntry.cs
- VariableQuery.cs
- RuleSettings.cs
- ListBoxChrome.cs
- ArrayConverter.cs
- ProcessRequestArgs.cs
- SettingsPropertyValue.cs
- SQLGuid.cs
- FixedSOMGroup.cs
- BamlWriter.cs
- ListParaClient.cs
- FileSystemWatcher.cs
- MultiAsyncResult.cs
- CorrelationToken.cs
- IsolatedStorageFile.cs
- SourceFilter.cs
- StringPropertyBuilder.cs
- DelegatedStream.cs
- TraceHandlerErrorFormatter.cs
- CommandField.cs
- XmlSchemaValidator.cs
- XPathParser.cs
- ConnectionStringEditor.cs
- XamlPoint3DCollectionSerializer.cs
- CollectionBuilder.cs
- mactripleDES.cs
- Setter.cs
- SqlCaseSimplifier.cs
- ThreadPool.cs
- BindingNavigator.cs
- EventProviderWriter.cs
- OracleNumber.cs
- HttpModule.cs
- PageRanges.cs
- AssemblyNameUtility.cs
- ReverseComparer.cs
- DataBindingList.cs
- OTFRasterizer.cs
- SqlTopReducer.cs
- PlatformNotSupportedException.cs