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
- WebPartDisplayModeCancelEventArgs.cs
- DefaultSerializationProviderAttribute.cs
- CodeDelegateInvokeExpression.cs
- HighlightComponent.cs
- BinaryParser.cs
- HttpResponseInternalWrapper.cs
- ToolStripItemClickedEventArgs.cs
- FontStretchConverter.cs
- StringReader.cs
- FileDialogCustomPlace.cs
- FontFamily.cs
- DbReferenceCollection.cs
- BehaviorEditorPart.cs
- TreeNodeBindingCollection.cs
- ContactManager.cs
- TdsParserStateObject.cs
- SourceSwitch.cs
- StrongName.cs
- StaticDataManager.cs
- HostDesigntimeLicenseContext.cs
- SecurityImpersonationBehavior.cs
- PropertyMetadata.cs
- StateMachineDesignerPaint.cs
- OrCondition.cs
- ManagementPath.cs
- NavigationPropertyEmitter.cs
- WrapPanel.cs
- TaskHelper.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SuppressMergeCheckAttribute.cs
- BamlReader.cs
- tooltip.cs
- HMACSHA1.cs
- WebBrowserSiteBase.cs
- Camera.cs
- ClientConfigurationSystem.cs
- GenericEnumerator.cs
- DataServiceExpressionVisitor.cs
- WindowsListViewItemStartMenu.cs
- ConstraintStruct.cs
- ListControlDesigner.cs
- CircleEase.cs
- DataSourceView.cs
- TailPinnedEventArgs.cs
- UnsafeNativeMethods.cs
- PackagePart.cs
- SortedList.cs
- IntSecurity.cs
- StrokeCollectionDefaultValueFactory.cs
- DataSpaceManager.cs
- HtmlTableCellCollection.cs
- AnimationException.cs
- HttpCacheParams.cs
- HandlerBase.cs
- XmlUtf8RawTextWriter.cs
- EventRoute.cs
- LayoutEvent.cs
- GCHandleCookieTable.cs
- ColorContext.cs
- SqlParameterCollection.cs
- DataGridViewCell.cs
- ActivityTypeCodeDomSerializer.cs
- ModelPerspective.cs
- DataGridCommandEventArgs.cs
- ListBoxChrome.cs
- CanonicalFontFamilyReference.cs
- NameValuePair.cs
- ArgumentException.cs
- SerializationObjectManager.cs
- CryptoKeySecurity.cs
- OletxTransactionHeader.cs
- DataGrid.cs
- PaginationProgressEventArgs.cs
- BrushConverter.cs
- RadioButtonList.cs
- UserControlAutomationPeer.cs
- CanExecuteRoutedEventArgs.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- HtmlEncodedRawTextWriter.cs
- ObjectIDGenerator.cs
- DataGridTextBoxColumn.cs
- WindowsScrollBar.cs
- DesignRelationCollection.cs
- XmlSchemaComplexContent.cs
- BitHelper.cs
- Visual3D.cs
- HtmlForm.cs
- ComboBoxItem.cs
- DataGridViewSortCompareEventArgs.cs
- PreloadedPackages.cs
- MouseDevice.cs
- HttpServerVarsCollection.cs
- DynamicRenderer.cs
- SchemaImporterExtensionElement.cs
- ListItemCollection.cs
- lengthconverter.cs
- _IPv6Address.cs
- XmlDataSource.cs
- _AcceptOverlappedAsyncResult.cs
- OleDbInfoMessageEvent.cs