Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / HyperlinkAutomationPeer.cs / 1305600 / 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; } else { return base.GetPattern(patternInterface); } } //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; } else { return base.GetPattern(patternInterface); } } //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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DeclarationUpdate.cs
- ExpressionNode.cs
- ToolStripItemRenderEventArgs.cs
- FileInfo.cs
- PartitionedDataSource.cs
- SqlClientFactory.cs
- GenericIdentity.cs
- RelatedCurrencyManager.cs
- TextContainerChangeEventArgs.cs
- pingexception.cs
- ObjectContextServiceProvider.cs
- Enum.cs
- PathParser.cs
- Pkcs9Attribute.cs
- ComplexPropertyEntry.cs
- FontCacheUtil.cs
- Monitor.cs
- TextBounds.cs
- TypedElement.cs
- ClientTarget.cs
- ControlPaint.cs
- SqlWebEventProvider.cs
- ListViewPagedDataSource.cs
- TextTreeExtractElementUndoUnit.cs
- SeparatorAutomationPeer.cs
- ProgressBar.cs
- GPRECT.cs
- CqlErrorHelper.cs
- VisualBrush.cs
- Queue.cs
- ASCIIEncoding.cs
- StreamWriter.cs
- FunctionUpdateCommand.cs
- PerformanceCounterPermission.cs
- SpellerStatusTable.cs
- ConfigurationLocationCollection.cs
- CodeStatement.cs
- CircleHotSpot.cs
- ExplicitDiscriminatorMap.cs
- PrimitiveCodeDomSerializer.cs
- CodeAttributeArgument.cs
- ConsoleEntryPoint.cs
- CustomAttributeSerializer.cs
- HandlerBase.cs
- Rectangle.cs
- MemberCollection.cs
- AncillaryOps.cs
- SizeChangedInfo.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- PasswordTextContainer.cs
- CreateWorkflowOwnerCommand.cs
- Encoder.cs
- LabelLiteral.cs
- LinkUtilities.cs
- XmlSerializationWriter.cs
- SchemaAttDef.cs
- MessageDescriptionCollection.cs
- EntityViewGenerator.cs
- WindowsNonControl.cs
- objectquery_tresulttype.cs
- FrameDimension.cs
- BinaryObjectWriter.cs
- CompositeFontFamily.cs
- Attributes.cs
- BufferedReadStream.cs
- EdmType.cs
- PlanCompiler.cs
- Baml2006KnownTypes.cs
- EventLogPermissionHolder.cs
- Geometry3D.cs
- AspProxy.cs
- OrderByExpression.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- basecomparevalidator.cs
- AppDomainCompilerProxy.cs
- RtfToken.cs
- ColumnResizeUndoUnit.cs
- SystemTcpStatistics.cs
- XmlNodeReader.cs
- DescendantOverDescendantQuery.cs
- VisualTreeUtils.cs
- PlanCompiler.cs
- SiteMapDataSourceView.cs
- DeviceSpecificChoice.cs
- TextSelectionProcessor.cs
- CatalogZone.cs
- ObjectDataSourceDesigner.cs
- FreezableOperations.cs
- Typeface.cs
- SafeMILHandle.cs
- ProxyAssemblyNotLoadedException.cs
- activationcontext.cs
- DesignerEditorPartChrome.cs
- ActivityCodeDomSerializationManager.cs
- TemplatePagerField.cs
- EventMappingSettingsCollection.cs
- ConfigurationConverterBase.cs
- ToolStripItemDataObject.cs
- WindowsStartMenu.cs
- _OSSOCK.cs