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
- DataObjectEventArgs.cs
- ListItem.cs
- DataViewListener.cs
- AutomationTextAttribute.cs
- ExpressionQuoter.cs
- EmptyStringExpandableObjectConverter.cs
- XmlSchemaNotation.cs
- MarshalByValueComponent.cs
- EFAssociationProvider.cs
- ToolStrip.cs
- DelegatingConfigHost.cs
- ObjectParameterCollection.cs
- CredentialSelector.cs
- EmptyStringExpandableObjectConverter.cs
- OleDbReferenceCollection.cs
- SafeNativeMemoryHandle.cs
- ViewStateModeByIdAttribute.cs
- GuidConverter.cs
- PixelFormats.cs
- ZipFileInfo.cs
- ImmutableObjectAttribute.cs
- Expander.cs
- LineServices.cs
- ListViewSortEventArgs.cs
- ComponentSerializationService.cs
- OutputCacheModule.cs
- EntityFunctions.cs
- ClientData.cs
- FieldReference.cs
- DiscriminatorMap.cs
- SelectedDatesCollection.cs
- HandleScope.cs
- SafeTimerHandle.cs
- Preprocessor.cs
- MetadataSerializer.cs
- TypeListConverter.cs
- DuplicateWaitObjectException.cs
- HtmlTableRowCollection.cs
- UserControlBuildProvider.cs
- TextOutput.cs
- RC2CryptoServiceProvider.cs
- GridItemPattern.cs
- XPathNavigatorKeyComparer.cs
- RenderDataDrawingContext.cs
- AccessControlList.cs
- XmlQueryTypeFactory.cs
- ControlPager.cs
- DataGridViewRowCollection.cs
- Matrix3D.cs
- Win32Exception.cs
- SettingsContext.cs
- _NestedSingleAsyncResult.cs
- WebPartCollection.cs
- Process.cs
- HtmlInputPassword.cs
- AdornerLayer.cs
- PeerDefaultCustomResolverClient.cs
- MetabaseServerConfig.cs
- BaseInfoTable.cs
- ExpressionPrinter.cs
- StrokeNodeOperations2.cs
- SqlCommandBuilder.cs
- NavigationFailedEventArgs.cs
- StateMachineDesignerPaint.cs
- Link.cs
- BoundColumn.cs
- SQLRoleProvider.cs
- SecurityAlgorithmSuite.cs
- Stroke2.cs
- PersistChildrenAttribute.cs
- PlaceHolder.cs
- UnsafePeerToPeerMethods.cs
- RuntimeVariablesExpression.cs
- TypeHelper.cs
- VBCodeProvider.cs
- WebPartConnectVerb.cs
- RuntimeEnvironment.cs
- EntityCommand.cs
- TypeDelegator.cs
- SafeArrayTypeMismatchException.cs
- Rule.cs
- arclist.cs
- ScriptControlManager.cs
- Aggregates.cs
- DetailsViewUpdateEventArgs.cs
- FlowLayout.cs
- GrammarBuilderRuleRef.cs
- HostingEnvironmentException.cs
- KeyGesture.cs
- FileDialog.cs
- ExceptionHandlers.cs
- TimeSpan.cs
- Win32.cs
- Vector3DAnimation.cs
- Marshal.cs
- TextPenaltyModule.cs
- PtsPage.cs
- HebrewCalendar.cs
- ThreadLocal.cs
- ButtonBaseAdapter.cs