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
- JulianCalendar.cs
- EventMappingSettings.cs
- ErrorHandlingAcceptor.cs
- StrokeFIndices.cs
- ProtocolsConfiguration.cs
- XmlSerializerSection.cs
- ClientSession.cs
- EntityDesignerUtils.cs
- ComPlusServiceLoader.cs
- Line.cs
- SelectedCellsChangedEventArgs.cs
- IDQuery.cs
- TypedDatasetGenerator.cs
- WebPartEventArgs.cs
- ControlUtil.cs
- DocumentDesigner.cs
- ComponentCommands.cs
- RoleGroupCollectionEditor.cs
- ListDictionaryInternal.cs
- OleDbParameter.cs
- CheckableControlBaseAdapter.cs
- RadioButtonList.cs
- CounterSampleCalculator.cs
- SqlRecordBuffer.cs
- AppearanceEditorPart.cs
- SecureUICommand.cs
- Point3DKeyFrameCollection.cs
- Calendar.cs
- RoleManagerSection.cs
- Lazy.cs
- Decimal.cs
- PeerNameRegistration.cs
- TextComposition.cs
- XmlHelper.cs
- DbModificationCommandTree.cs
- Light.cs
- SaveFileDialog.cs
- Localizer.cs
- FullTrustAssembliesSection.cs
- DataControlFieldCell.cs
- QilInvoke.cs
- Point3DCollectionConverter.cs
- Grammar.cs
- InvokePattern.cs
- TraceShell.cs
- FormatConvertedBitmap.cs
- DefaultSerializationProviderAttribute.cs
- DropAnimation.xaml.cs
- EventLogException.cs
- FormsAuthenticationUserCollection.cs
- CapabilitiesAssignment.cs
- ValidationSummary.cs
- GenericTypeParameterBuilder.cs
- ResourceReferenceKeyNotFoundException.cs
- DeobfuscatingStream.cs
- LabelDesigner.cs
- WSHttpBindingCollectionElement.cs
- SecurityDescriptor.cs
- CodeSubDirectoriesCollection.cs
- Version.cs
- DbModificationClause.cs
- SourceItem.cs
- ThicknessConverter.cs
- XPathNodePointer.cs
- followingsibling.cs
- SystemFonts.cs
- Vector3DConverter.cs
- MultiBindingExpression.cs
- XmlAttribute.cs
- TextServicesContext.cs
- CrossSiteScriptingValidation.cs
- RegistrySecurity.cs
- WebSysDefaultValueAttribute.cs
- EventSetter.cs
- HandledEventArgs.cs
- ScriptIgnoreAttribute.cs
- LongValidatorAttribute.cs
- BatchServiceHost.cs
- NativeRecognizer.cs
- FixedPageProcessor.cs
- XmlBindingWorker.cs
- DodSequenceMerge.cs
- SecurityMessageProperty.cs
- WebHttpDispatchOperationSelector.cs
- Scene3D.cs
- ValidationError.cs
- contentDescriptor.cs
- DocumentXPathNavigator.cs
- StringReader.cs
- CurrentChangingEventArgs.cs
- WebPartHelpVerb.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- ArrayElementGridEntry.cs
- Exception.cs
- FilterableAttribute.cs
- DataGridViewLinkCell.cs
- DrawingContextWalker.cs
- webbrowsersite.cs
- CodePageUtils.cs
- QueueAccessMode.cs