Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / Win32Providers / MS / Internal / AutomationProxies / WindowsToolbarAsMenu.cs / 1305600 / WindowsToolbarAsMenu.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Some applications implement menus with toolbars. This proxy // will used the IAccessible to expose these toolbars as // menus. This proxy is derived from WindowsToolbar since // the underlying control really is a toolbar and WindowsToolbar // knows how to communicate with then underlying toolbar control // already. // // History: // 01/31/2005 : [....] Created //--------------------------------------------------------------------------- using System; using System.Windows.Automation; using MS.Win32; namespace MS.Internal.AutomationProxies { class WindowsToolbarAsMenu : WindowsToolbar { // ----------------------------------------------------- // // Constructors // // ----------------------------------------------------- #region Constructors internal WindowsToolbarAsMenu(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) : base( hwnd, parent, item ) { _acc = acc; // Set the control type based on the IAccessible role. AccessibleRole role = acc.Role; if (role == AccessibleRole.MenuBar) { _cControlType = ControlType.MenuBar; _sAutomationId = "MenuBar"; // This string is a non-localizable string } else if (role == AccessibleRole.MenuPopup) { _cControlType = ControlType.Menu; _sAutomationId = "MenuPopup"; // This string is a non-localizable string } else { System.Diagnostics.Debug.Assert(false, "Unexpected role " + role); } } #endregion // ------------------------------------------------------ // // Private Fields // // ----------------------------------------------------- #region Private Fields Accessible _acc; #endregion } } // 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
- Pair.cs
- TabControlToolboxItem.cs
- DataGridPagerStyle.cs
- Axis.cs
- TraceShell.cs
- SQLResource.cs
- ObjectTokenCategory.cs
- QuestionEventArgs.cs
- OpenTypeCommon.cs
- MultiPageTextView.cs
- SamlSerializer.cs
- StackBuilderSink.cs
- ApplicationProxyInternal.cs
- ToggleButtonAutomationPeer.cs
- XmlHelper.cs
- EntityType.cs
- XPathAncestorQuery.cs
- MetadataArtifactLoaderResource.cs
- SingleBodyParameterMessageFormatter.cs
- ParameterCollection.cs
- ContextCorrelationInitializer.cs
- _UncName.cs
- HtmlLink.cs
- ProxyWebPart.cs
- PersonalizableTypeEntry.cs
- SlotInfo.cs
- KnownBoxes.cs
- ToggleButtonAutomationPeer.cs
- DocumentViewerBase.cs
- SystemIPAddressInformation.cs
- linebase.cs
- ClientSideProviderDescription.cs
- ProvidersHelper.cs
- RepeaterItemEventArgs.cs
- DesignTimeParseData.cs
- PersonalizationStateInfoCollection.cs
- Graphics.cs
- CrossContextChannel.cs
- MetadataItemEmitter.cs
- XmlWriterSettings.cs
- MobileCapabilities.cs
- ProviderMetadata.cs
- CommandDesigner.cs
- ListChangedEventArgs.cs
- QueryExpression.cs
- JoinCqlBlock.cs
- CodeGeneratorOptions.cs
- CompoundFileStorageReference.cs
- AccessControlList.cs
- SqlBuilder.cs
- EntityDataSourceMemberPath.cs
- StringComparer.cs
- ParseChildrenAsPropertiesAttribute.cs
- PackUriHelper.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AnimatedTypeHelpers.cs
- ServiceRoute.cs
- RawStylusInputReport.cs
- ZoneMembershipCondition.cs
- ToolTipService.cs
- XPathNodeHelper.cs
- diagnosticsswitches.cs
- Storyboard.cs
- StateDesigner.cs
- WebPartDescriptionCollection.cs
- SQLByteStorage.cs
- ShaderRenderModeValidation.cs
- ProcessProtocolHandler.cs
- MbpInfo.cs
- TreeNodeBindingCollection.cs
- StringInfo.cs
- ParameterElement.cs
- ProviderConnectionPointCollection.cs
- METAHEADER.cs
- _NegoStream.cs
- DisplayNameAttribute.cs
- ButtonStandardAdapter.cs
- ListItemConverter.cs
- SynchronizingStream.cs
- ListItemParagraph.cs
- Ref.cs
- OpCodes.cs
- RegisteredArrayDeclaration.cs
- SymmetricAlgorithm.cs
- CharacterHit.cs
- DocumentViewerAutomationPeer.cs
- Quad.cs
- UITypeEditor.cs
- SQLMoney.cs
- ParallelTimeline.cs
- WebException.cs
- UnorderedHashRepartitionStream.cs
- DataGridRowClipboardEventArgs.cs
- SecurityElement.cs
- ExtendedPropertyCollection.cs
- webproxy.cs
- Util.cs
- RuntimeHandles.cs
- SmiGettersStream.cs
- Stack.cs