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
- UserControl.cs
- PerformanceCounterPermissionAttribute.cs
- PriorityBinding.cs
- TextEditorCopyPaste.cs
- FileDialog_Vista.cs
- SrgsRule.cs
- SqlNode.cs
- DesignerOptionService.cs
- ElementFactory.cs
- UInt64Storage.cs
- BamlTreeMap.cs
- ImageListStreamer.cs
- _ListenerAsyncResult.cs
- DirectoryInfo.cs
- TextEndOfSegment.cs
- ClientProtocol.cs
- WorkflowView.cs
- DataSourceNameHandler.cs
- PropertyTabAttribute.cs
- SafePEFileHandle.cs
- MachineSettingsSection.cs
- ReadContentAsBinaryHelper.cs
- ContextDataSource.cs
- httpserverutility.cs
- Attributes.cs
- BufferedReceiveManager.cs
- RequestContextBase.cs
- Vector3DAnimationUsingKeyFrames.cs
- ScopelessEnumAttribute.cs
- TypeBuilder.cs
- UnsafeNativeMethods.cs
- StringUtil.cs
- DesignerUtils.cs
- SetStoryboardSpeedRatio.cs
- ExpressionStringBuilder.cs
- LazyLoadBehavior.cs
- VBCodeProvider.cs
- DBParameter.cs
- DescriptionAttribute.cs
- ColumnHeader.cs
- RtfControlWordInfo.cs
- IFormattable.cs
- Mapping.cs
- HtmlTernaryTree.cs
- ButtonFlatAdapter.cs
- cookiecontainer.cs
- DbConnectionHelper.cs
- M3DUtil.cs
- Attributes.cs
- StreamGeometry.cs
- CodeCompiler.cs
- Random.cs
- XmlCollation.cs
- PackageDigitalSignature.cs
- SimpleLine.cs
- PolicyLevel.cs
- SocketPermission.cs
- EdmPropertyAttribute.cs
- TypeDescriptionProviderAttribute.cs
- Logging.cs
- SliderAutomationPeer.cs
- Compiler.cs
- SecurityRuntime.cs
- SqlNodeAnnotation.cs
- ResourceDefaultValueAttribute.cs
- PenCursorManager.cs
- UpdateProgress.cs
- MarkerProperties.cs
- ThicknessAnimationUsingKeyFrames.cs
- Expression.cs
- StateMachineExecutionState.cs
- ObjectItemNoOpAssemblyLoader.cs
- Vector.cs
- XmlnsDefinitionAttribute.cs
- InvalidDataContractException.cs
- ToolStripManager.cs
- DetailsViewDeleteEventArgs.cs
- COM2Properties.cs
- SearchExpression.cs
- Attributes.cs
- TextWriterEngine.cs
- UIElementCollection.cs
- LogRestartAreaEnumerator.cs
- RootDesignerSerializerAttribute.cs
- RepeaterCommandEventArgs.cs
- PeerContact.cs
- ISAPIWorkerRequest.cs
- OutputCacheProviderCollection.cs
- BasicHttpMessageCredentialType.cs
- TypeConverterHelper.cs
- TextSpanModifier.cs
- CurrentTimeZone.cs
- PrintingPermissionAttribute.cs
- VisualTarget.cs
- ObjectStateEntryDbDataRecord.cs
- Win32.cs
- _NetworkingPerfCounters.cs
- GeometryValueSerializer.cs
- AttachedProperty.cs
- TimerEventSubscriptionCollection.cs