Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / UIAutomation / Win32Providers / MS / Internal / AutomationProxies / WindowsToolbarAsMenu.cs / 1 / 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. //---------------------------------------------------------------------------- // //// 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
- GatewayDefinition.cs
- ExpandCollapseIsCheckedConverter.cs
- DesignerCatalogPartChrome.cs
- HyperlinkAutomationPeer.cs
- CharConverter.cs
- CodeTypeDeclaration.cs
- WpfMemberInvoker.cs
- PagedDataSource.cs
- Message.cs
- Lease.cs
- Misc.cs
- OracleCommand.cs
- DictationGrammar.cs
- StateManagedCollection.cs
- DragDropHelper.cs
- Rotation3DAnimation.cs
- NGCSerializerAsync.cs
- ValueUtilsSmi.cs
- DeviceFiltersSection.cs
- NotifyIcon.cs
- SelectorAutomationPeer.cs
- _NegoStream.cs
- AssemblyAssociatedContentFileAttribute.cs
- DurableInstanceProvider.cs
- DataTableCollection.cs
- SafeNativeMethods.cs
- SortedList.cs
- MetadataException.cs
- WebEventCodes.cs
- ClientTarget.cs
- AdornerDecorator.cs
- MemoryRecordBuffer.cs
- CodeParameterDeclarationExpressionCollection.cs
- IndexingContentUnit.cs
- TextEffect.cs
- Helper.cs
- ListViewGroupItemCollection.cs
- XPathPatternBuilder.cs
- ExpandedWrapper.cs
- PaginationProgressEventArgs.cs
- AlgoModule.cs
- CollectionChangeEventArgs.cs
- WebPartsPersonalization.cs
- DeclaredTypeValidator.cs
- HandlerBase.cs
- SystemParameters.cs
- ObjectPersistData.cs
- CodeAttributeDeclaration.cs
- SelectiveScrollingGrid.cs
- FixedTextPointer.cs
- SqlGatherProducedAliases.cs
- IApplicationTrustManager.cs
- Configuration.cs
- BindingExpression.cs
- log.cs
- Stackframe.cs
- XmlNode.cs
- AndAlso.cs
- VarRemapper.cs
- SQLInt64.cs
- WebPartEditorOkVerb.cs
- SafeNativeMethods.cs
- TableHeaderCell.cs
- Padding.cs
- KeyMatchBuilder.cs
- BindingCompleteEventArgs.cs
- SecureStringHasher.cs
- AuthorizationPolicyTypeElement.cs
- InvalidProgramException.cs
- Constraint.cs
- Boolean.cs
- SyndicationSerializer.cs
- ToggleButtonAutomationPeer.cs
- HandlerBase.cs
- RectAnimation.cs
- BoundsDrawingContextWalker.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ProcessingInstructionAction.cs
- TextContainerChangeEventArgs.cs
- Size3D.cs
- DataGridViewCellValueEventArgs.cs
- WebSysDisplayNameAttribute.cs
- ExecutionScope.cs
- ACL.cs
- X509Extension.cs
- ToolStripSplitButton.cs
- UriTemplatePathSegment.cs
- SecurityContextSecurityToken.cs
- HttpClientChannel.cs
- CqlLexer.cs
- PrimitiveCodeDomSerializer.cs
- GCHandleCookieTable.cs
- RectIndependentAnimationStorage.cs
- SqlNamer.cs
- FormsAuthenticationCredentials.cs
- MatrixTransform.cs
- TrackingAnnotationCollection.cs
- NullRuntimeConfig.cs
- GroupBox.cs
- TextBox.cs