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
- RegexEditorDialog.cs
- Part.cs
- FixedFindEngine.cs
- PostBackOptions.cs
- GlyphElement.cs
- CustomErrorsSectionWrapper.cs
- SqlClientPermission.cs
- ColumnCollection.cs
- DetailsViewRow.cs
- DiscoveryClientBindingElement.cs
- EpmSyndicationContentSerializer.cs
- ProjectionCamera.cs
- QilTernary.cs
- ECDiffieHellmanPublicKey.cs
- ToolStripItemRenderEventArgs.cs
- DataServiceConfiguration.cs
- VirtualizedItemPattern.cs
- BuiltInPermissionSets.cs
- SchemaTableOptionalColumn.cs
- BaseTemplateBuildProvider.cs
- WebPartManager.cs
- LinqDataSourceValidationException.cs
- StyleSheetDesigner.cs
- LinkDescriptor.cs
- SplineKeyFrames.cs
- ArrangedElement.cs
- EventLog.cs
- XmlIterators.cs
- SystemParameters.cs
- XmlParserContext.cs
- ApplicationException.cs
- DataGridViewDataConnection.cs
- RequestCachePolicyConverter.cs
- WebMessageBodyStyleHelper.cs
- SqlSupersetValidator.cs
- IImplicitResourceProvider.cs
- ContractUtils.cs
- GZipDecoder.cs
- ProtocolsSection.cs
- TextEditorSpelling.cs
- XamlPoint3DCollectionSerializer.cs
- DescendantOverDescendantQuery.cs
- ParentUndoUnit.cs
- SimpleWorkerRequest.cs
- GlobalizationSection.cs
- Schedule.cs
- SqlNotificationEventArgs.cs
- Renderer.cs
- Scene3D.cs
- FrameworkElementFactory.cs
- ParameterCollection.cs
- NativeCompoundFileAPIs.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- HttpHandlerAction.cs
- ThemeableAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ActivityBindForm.Designer.cs
- CodeSnippetTypeMember.cs
- XmlSerializer.cs
- WindowShowOrOpenTracker.cs
- Selection.cs
- EmptyElement.cs
- FontConverter.cs
- MSHTMLHostUtil.cs
- EventHandlersStore.cs
- Binding.cs
- DocumentsTrace.cs
- KeyFrames.cs
- SelectedDatesCollection.cs
- CheckBox.cs
- XPathNodeList.cs
- datacache.cs
- ValueChangedEventManager.cs
- DupHandleConnectionReader.cs
- FixedSOMFixedBlock.cs
- TargetParameterCountException.cs
- CharAnimationBase.cs
- DataGridRowHeaderAutomationPeer.cs
- Transform3D.cs
- HttpCacheVaryByContentEncodings.cs
- EdmProperty.cs
- ScriptHandlerFactory.cs
- ReadOnlyHierarchicalDataSource.cs
- _LocalDataStoreMgr.cs
- CryptoStream.cs
- EntityStoreSchemaFilterEntry.cs
- FormView.cs
- XmlNamespaceMappingCollection.cs
- AVElementHelper.cs
- Viewport2DVisual3D.cs
- DbFunctionCommandTree.cs
- Solver.cs
- SystemWebCachingSectionGroup.cs
- MatrixValueSerializer.cs
- PerformanceCounterPermission.cs
- ViewManager.cs
- DataServiceQueryOfT.cs
- ListDictionaryInternal.cs
- SqlException.cs
- ToolStripSplitStackLayout.cs