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
- MethodBody.cs
- DrawingImage.cs
- ParseChildrenAsPropertiesAttribute.cs
- WinEventQueueItem.cs
- ParserOptions.cs
- _Semaphore.cs
- RedirectionProxy.cs
- SafePointer.cs
- AssociatedControlConverter.cs
- OleDbError.cs
- StringDictionary.cs
- AvTraceDetails.cs
- SqlMethodAttribute.cs
- CellConstantDomain.cs
- TextBlock.cs
- Exceptions.cs
- ToolboxComponentsCreatingEventArgs.cs
- Boolean.cs
- SlipBehavior.cs
- WeakReference.cs
- ScriptingWebServicesSectionGroup.cs
- Compress.cs
- RuleSettingsCollection.cs
- ToolStripItem.cs
- _ContextAwareResult.cs
- ObfuscateAssemblyAttribute.cs
- TemplateParser.cs
- AsyncOperationManager.cs
- LoaderAllocator.cs
- DataGridViewButtonColumn.cs
- SHA256Cng.cs
- PackWebRequest.cs
- FontWeights.cs
- ControlTemplate.cs
- SessionIDManager.cs
- BindingCollection.cs
- UpdatePanel.cs
- ServiceOperation.cs
- Localizer.cs
- DrawingContext.cs
- DesignOnlyAttribute.cs
- CommandLibraryHelper.cs
- WebServiceEnumData.cs
- ProfileInfo.cs
- GroupBoxRenderer.cs
- Button.cs
- Pair.cs
- Condition.cs
- Int64Storage.cs
- Pen.cs
- TableCell.cs
- XmlCDATASection.cs
- WindowsEditBox.cs
- TimeSpanValidatorAttribute.cs
- MatrixTransform3D.cs
- AttachedPropertiesService.cs
- ContentValidator.cs
- Bitmap.cs
- AppearanceEditorPart.cs
- SmiEventSink_DeferedProcessing.cs
- StartUpEventArgs.cs
- ManipulationDeltaEventArgs.cs
- ContextStack.cs
- ColorTransformHelper.cs
- HMACSHA512.cs
- CompModSwitches.cs
- DomainLiteralReader.cs
- TypePropertyEditor.cs
- ApplicationSettingsBase.cs
- ConfigurationLocation.cs
- base64Transforms.cs
- PageCache.cs
- ConnectionsZone.cs
- HierarchicalDataSourceControl.cs
- returneventsaver.cs
- ChooseAction.cs
- ReadOnlyAttribute.cs
- ExpressionsCollectionConverter.cs
- RepeatInfo.cs
- _SecureChannel.cs
- EdmTypeAttribute.cs
- CodeCatchClauseCollection.cs
- DocumentsTrace.cs
- TraceLog.cs
- WindowsToolbarItemAsMenuItem.cs
- SqlCacheDependency.cs
- Model3D.cs
- Pair.cs
- DatatypeImplementation.cs
- X509Certificate2Collection.cs
- SingleAnimationBase.cs
- UTF32Encoding.cs
- PasswordBox.cs
- RegexWorker.cs
- SqlRowUpdatingEvent.cs
- BitmapEffectGroup.cs
- WindowsFormsHostAutomationPeer.cs
- CommandDesigner.cs
- SrgsText.cs
- VectorCollection.cs