Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- AssemblyBuilder.cs
- ObjectStateManager.cs
- GenericPrincipal.cs
- WithStatement.cs
- WsdlHelpGeneratorElement.cs
- glyphs.cs
- HandlerWithFactory.cs
- ZipIORawDataFileBlock.cs
- ListViewInsertionMark.cs
- BaseProcessor.cs
- PopupRoot.cs
- Html32TextWriter.cs
- ListView.cs
- SizeChangedEventArgs.cs
- ProfileModule.cs
- TrustManagerMoreInformation.cs
- UpdatePanel.cs
- IPAddress.cs
- safePerfProviderHandle.cs
- CodeGenerator.cs
- FixedPage.cs
- WebPartVerbsEventArgs.cs
- WsdlInspector.cs
- FutureFactory.cs
- Vector3DCollectionValueSerializer.cs
- AnnotationResource.cs
- MemberCollection.cs
- NumberSubstitution.cs
- UInt64Converter.cs
- PlatformNotSupportedException.cs
- EffectiveValueEntry.cs
- ThousandthOfEmRealPoints.cs
- XmlCharType.cs
- EventHandlersStore.cs
- AsyncOperationManager.cs
- JsonReader.cs
- SeparatorAutomationPeer.cs
- ModuleBuilder.cs
- Operator.cs
- TreeIterator.cs
- DateTimeConverter2.cs
- X509SecurityToken.cs
- CompoundFileStorageReference.cs
- WorkflowDebuggerSteppingAttribute.cs
- QilVisitor.cs
- BinaryObjectInfo.cs
- ExceptionUtil.cs
- Vector3dCollection.cs
- XmlSchemaDatatype.cs
- InputScopeConverter.cs
- XPathAncestorIterator.cs
- EntityType.cs
- HMACSHA1.cs
- MobileControl.cs
- DistributedTransactionPermission.cs
- GridViewColumnCollection.cs
- XmlSchemaAnnotated.cs
- ProfileModule.cs
- MenuItemStyle.cs
- TransformPatternIdentifiers.cs
- XmlIterators.cs
- Model3DCollection.cs
- Latin1Encoding.cs
- NavigationWindowAutomationPeer.cs
- ToolStripPanelRow.cs
- NumberFormatInfo.cs
- AsyncResult.cs
- ContractMethodParameterInfo.cs
- TreeNodeBinding.cs
- MediaCommands.cs
- MaskedTextBoxDesigner.cs
- ActivityMetadata.cs
- Solver.cs
- VirtualizingStackPanel.cs
- GlyphRunDrawing.cs
- DataGridColumnDropSeparator.cs
- MobileControl.cs
- XmlDataDocument.cs
- Pair.cs
- SoapFaultCodes.cs
- SortedList.cs
- HttpHandlerActionCollection.cs
- CompilerCollection.cs
- CombinedGeometry.cs
- MimeTypeMapper.cs
- SQLCharsStorage.cs
- TextTreeText.cs
- WindowsTokenRoleProvider.cs
- KnownBoxes.cs
- DataService.cs
- UiaCoreApi.cs
- Compilation.cs
- UndoManager.cs
- FrameworkTextComposition.cs
- XmlSchemaAttribute.cs
- PolyQuadraticBezierSegment.cs
- CryptoKeySecurity.cs
- ToolStripItemRenderEventArgs.cs
- RSAProtectedConfigurationProvider.cs
- IPHostEntry.cs