Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- WebPartDisplayMode.cs
- XamlReader.cs
- PointAnimation.cs
- ProxyAttribute.cs
- AttributeCollection.cs
- ColorConverter.cs
- SessionStateModule.cs
- IconBitmapDecoder.cs
- BasePattern.cs
- CacheHelper.cs
- HtmlTableRow.cs
- ClassHandlersStore.cs
- PrePostDescendentsWalker.cs
- PropertyDescriptorComparer.cs
- ColumnReorderedEventArgs.cs
- DataViewSetting.cs
- ProcessHostConfigUtils.cs
- XmlSchemaSimpleTypeList.cs
- fixedPageContentExtractor.cs
- MultiPropertyDescriptorGridEntry.cs
- AttributedMetaModel.cs
- SynchronizationScope.cs
- AtomMaterializerLog.cs
- StateMachineTimers.cs
- DataGridViewElement.cs
- CodeGotoStatement.cs
- ClockGroup.cs
- SoapFormatterSinks.cs
- CheckPair.cs
- PolyLineSegmentFigureLogic.cs
- TransactionFormatter.cs
- ConfigurationElement.cs
- MachineKeyConverter.cs
- UriExt.cs
- PrimarySelectionAdorner.cs
- Accessible.cs
- Line.cs
- BuildProviderAppliesToAttribute.cs
- TextServicesProperty.cs
- XmlAttributeCache.cs
- Calendar.cs
- XmlSerializationReader.cs
- StylusDownEventArgs.cs
- DataGridView.cs
- WebPartRestoreVerb.cs
- PenContexts.cs
- TimeZone.cs
- SqlAliaser.cs
- SettingsSavedEventArgs.cs
- COSERVERINFO.cs
- AxisAngleRotation3D.cs
- webproxy.cs
- EmbeddedMailObjectCollectionEditor.cs
- SymmetricAlgorithm.cs
- XPathNodeInfoAtom.cs
- CacheVirtualItemsEvent.cs
- DiscoveryClient.cs
- ContainerAction.cs
- SchemaContext.cs
- ValueChangedEventManager.cs
- ElementsClipboardData.cs
- PersonalizationProviderCollection.cs
- XmlSchemaAll.cs
- CheckedPointers.cs
- ThousandthOfEmRealPoints.cs
- ClientSideQueueItem.cs
- ForEachAction.cs
- SessionEndingEventArgs.cs
- Keywords.cs
- Wizard.cs
- DataObjectPastingEventArgs.cs
- IncrementalHitTester.cs
- SystemKeyConverter.cs
- ADRoleFactory.cs
- _SslState.cs
- GeometryDrawing.cs
- CodeTypeParameter.cs
- PersonalizationStateInfoCollection.cs
- RecommendedAsConfigurableAttribute.cs
- AccessDataSource.cs
- StatusBar.cs
- DataServiceHostFactory.cs
- smtppermission.cs
- TypeExtensionConverter.cs
- TableSectionStyle.cs
- ComplexLine.cs
- PagesChangedEventArgs.cs
- HMACSHA384.cs
- base64Transforms.cs
- XPathSelfQuery.cs
- ManipulationPivot.cs
- HtmlTitle.cs
- DataRelationCollection.cs
- XamlTypeMapper.cs
- XmlTypeMapping.cs
- ViewCellSlot.cs
- InkCanvasInnerCanvas.cs
- Number.cs
- TabletDevice.cs
- ClientConfigPaths.cs