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
- QueryNode.cs
- XmlSerializer.cs
- ScrollViewerAutomationPeer.cs
- TagMapCollection.cs
- WorkItem.cs
- AddInDeploymentState.cs
- BaseTemplatedMobileComponentEditor.cs
- ForwardPositionQuery.cs
- UpdateRecord.cs
- SQLResource.cs
- WindowsFormsEditorServiceHelper.cs
- Evidence.cs
- DBConnectionString.cs
- DynamicRenderer.cs
- activationcontext.cs
- ListMarkerSourceInfo.cs
- TreeNodeEventArgs.cs
- ToolStripItemImageRenderEventArgs.cs
- HierarchicalDataBoundControlAdapter.cs
- MLangCodePageEncoding.cs
- ECDiffieHellmanPublicKey.cs
- DataGridViewCellStyleEditor.cs
- ShaderRenderModeValidation.cs
- NetTcpSecurity.cs
- TextBoxLine.cs
- XmlSchemaComplexContent.cs
- ListDataBindEventArgs.cs
- FixedDocumentSequencePaginator.cs
- HttpWriter.cs
- EntityClientCacheKey.cs
- datacache.cs
- OrderPreservingMergeHelper.cs
- DBCommandBuilder.cs
- Facet.cs
- GraphicsPath.cs
- SQLCharsStorage.cs
- MemoryPressure.cs
- EtwTrace.cs
- GACIdentityPermission.cs
- COM2PictureConverter.cs
- PenContext.cs
- ComponentResourceKeyConverter.cs
- shaperfactoryquerycachekey.cs
- HMACMD5.cs
- Path.cs
- MDIWindowDialog.cs
- RenderTargetBitmap.cs
- Panel.cs
- DataBoundControl.cs
- VectorConverter.cs
- GACMembershipCondition.cs
- WebPartEventArgs.cs
- AssemblyEvidenceFactory.cs
- XmlDataSourceDesigner.cs
- GridViewCommandEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- TypeSystemHelpers.cs
- ReferenceEqualityComparer.cs
- ArrayConverter.cs
- glyphs.cs
- DbReferenceCollection.cs
- WebPartMenu.cs
- AspCompat.cs
- Compress.cs
- PageFunction.cs
- DPAPIProtectedConfigurationProvider.cs
- _TransmitFileOverlappedAsyncResult.cs
- DataGridViewTopRowAccessibleObject.cs
- RunInstallerAttribute.cs
- TransactionScope.cs
- OrderedDictionary.cs
- XmlAttributeOverrides.cs
- GroupStyle.cs
- ICspAsymmetricAlgorithm.cs
- _BasicClient.cs
- DataGridToolTip.cs
- SystemWebCachingSectionGroup.cs
- GradientStopCollection.cs
- Visitors.cs
- UTF7Encoding.cs
- webeventbuffer.cs
- Rect.cs
- MessageQueue.cs
- KeyInstance.cs
- SwitchCase.cs
- SchemaTableOptionalColumn.cs
- BinaryMessageEncodingElement.cs
- TypeConverterHelper.cs
- DataKey.cs
- NamedObject.cs
- ResolveDuplex11AsyncResult.cs
- ValidationRule.cs
- GenericAuthenticationEventArgs.cs
- WeakReference.cs
- FormattedTextSymbols.cs
- UpnEndpointIdentity.cs
- FormsAuthenticationUser.cs
- ChtmlSelectionListAdapter.cs
- TransactionFlowBindingElementImporter.cs
- NonClientArea.cs