Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- EdmType.cs
- ProviderManager.cs
- ExpressionBuilderCollection.cs
- TextBoxView.cs
- EntityWithChangeTrackerStrategy.cs
- ReadOnlyCollection.cs
- MissingManifestResourceException.cs
- AsyncResult.cs
- ValueOfAction.cs
- PackWebRequest.cs
- XmlElement.cs
- DefinitionUpdate.cs
- SectionUpdates.cs
- RoutedEventValueSerializer.cs
- TemplateComponentConnector.cs
- ArcSegment.cs
- GridView.cs
- OleDbDataAdapter.cs
- RegexCaptureCollection.cs
- ColumnWidthChangedEvent.cs
- ToolStripMenuItemDesigner.cs
- AssemblyInfo.cs
- SmiSettersStream.cs
- CommandPlan.cs
- SemanticValue.cs
- AspProxy.cs
- FillRuleValidation.cs
- HtmlMeta.cs
- Dynamic.cs
- RuleProcessor.cs
- DynamicActivityProperty.cs
- ObjectQueryExecutionPlan.cs
- PanningMessageFilter.cs
- StorageTypeMapping.cs
- TableCellAutomationPeer.cs
- PanelStyle.cs
- DialogResultConverter.cs
- ExceptionValidationRule.cs
- CompilerTypeWithParams.cs
- WebSysDescriptionAttribute.cs
- ConstraintConverter.cs
- StaticTextPointer.cs
- mactripleDES.cs
- BamlRecordWriter.cs
- TextElementEnumerator.cs
- BitmapEffectCollection.cs
- Pkcs9Attribute.cs
- ControlPersister.cs
- RIPEMD160.cs
- DefaultPropertyAttribute.cs
- AssemblyCache.cs
- MenuCommands.cs
- Int32Rect.cs
- StaticDataManager.cs
- DataColumnPropertyDescriptor.cs
- RuntimeArgument.cs
- Automation.cs
- ReadOnlyCollectionBase.cs
- PrivilegedConfigurationManager.cs
- EffectiveValueEntry.cs
- RelativeSource.cs
- XmlSchemaGroupRef.cs
- WebPartVerb.cs
- HttpRequestTraceRecord.cs
- DLinqTableProvider.cs
- PropertyValue.cs
- ResolveInfo.cs
- XmlQueryType.cs
- CellParagraph.cs
- ExpressionEditorAttribute.cs
- WebPartZoneCollection.cs
- XmlSerializerSection.cs
- OleDbEnumerator.cs
- SQLSingleStorage.cs
- DecoratedNameAttribute.cs
- ReachUIElementCollectionSerializerAsync.cs
- SrgsElementFactoryCompiler.cs
- Animatable.cs
- ButtonBase.cs
- PagerSettings.cs
- GenericTypeParameterBuilder.cs
- EventLogPermissionEntry.cs
- CodeMemberEvent.cs
- DbProviderSpecificTypePropertyAttribute.cs
- DataListItem.cs
- WebPartManagerDesigner.cs
- EntityClientCacheEntry.cs
- PathGradientBrush.cs
- HMACMD5.cs
- XmlSerializerSection.cs
- TableParagraph.cs
- XmlSchemaRedefine.cs
- WindowInteractionStateTracker.cs
- IdentityReference.cs
- GridViewColumnHeaderAutomationPeer.cs
- URLString.cs
- DynamicActionMessageFilter.cs
- HttpEncoderUtility.cs
- ImageDrawing.cs
- LinearQuaternionKeyFrame.cs