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
- ImageAttributes.cs
- SpellerStatusTable.cs
- GridViewUpdateEventArgs.cs
- CodeExpressionStatement.cs
- ToolStripScrollButton.cs
- SettingsBase.cs
- FactoryMaker.cs
- ReflectionPermission.cs
- DataGridViewCellValidatingEventArgs.cs
- PropertyMap.cs
- ResourceReferenceKeyNotFoundException.cs
- COMException.cs
- LayoutManager.cs
- XmlAttributeAttribute.cs
- BrowserCapabilitiesFactory.cs
- OleDbReferenceCollection.cs
- ComplexPropertyEntry.cs
- MissingFieldException.cs
- XPathNavigatorKeyComparer.cs
- PageContentCollection.cs
- MailSettingsSection.cs
- PtsPage.cs
- ByteStream.cs
- login.cs
- Content.cs
- SamlConstants.cs
- JoinGraph.cs
- ConstructorExpr.cs
- adornercollection.cs
- NavigatorOutput.cs
- Point4DConverter.cs
- XmlSerializerAssemblyAttribute.cs
- _PooledStream.cs
- Privilege.cs
- CompilerParameters.cs
- Encoder.cs
- ReverseInheritProperty.cs
- XamlReader.cs
- CodeTypeMember.cs
- ConditionalBranch.cs
- BookmarkManager.cs
- HtmlTable.cs
- HMACRIPEMD160.cs
- ColumnMapCopier.cs
- SqlTypeSystemProvider.cs
- SkipStoryboardToFill.cs
- DaylightTime.cs
- WebPartManagerInternals.cs
- DbConnectionInternal.cs
- RtfControlWordInfo.cs
- TemplateColumn.cs
- Executor.cs
- DefaultMergeHelper.cs
- EnumerableValidator.cs
- WindowsAuthenticationModule.cs
- OleDbConnection.cs
- MembershipPasswordException.cs
- DataGridGeneralPage.cs
- MouseBinding.cs
- Trigger.cs
- FormParameter.cs
- ToolStripContentPanel.cs
- EntityType.cs
- ResourcesBuildProvider.cs
- MembershipValidatePasswordEventArgs.cs
- WebPartConnectionsConnectVerb.cs
- Marshal.cs
- SystemUnicastIPAddressInformation.cs
- SeverityFilter.cs
- MouseOverProperty.cs
- StagingAreaInputItem.cs
- MatrixAnimationBase.cs
- Quaternion.cs
- InvalidProgramException.cs
- HttpProcessUtility.cs
- PermissionSetTriple.cs
- DataGridViewCellParsingEventArgs.cs
- QueryServiceConfigHandle.cs
- XXXInfos.cs
- DocumentSequenceHighlightLayer.cs
- PointCollectionConverter.cs
- ObjectHandle.cs
- LocalizableResourceBuilder.cs
- ADMembershipProvider.cs
- CurrentChangingEventManager.cs
- SystemNetworkInterface.cs
- DbConnectionHelper.cs
- regiisutil.cs
- DesignerAttribute.cs
- HtmlImage.cs
- EditorZoneAutoFormat.cs
- SystemException.cs
- SQLBytes.cs
- WpfSharedXamlSchemaContext.cs
- TransformedBitmap.cs
- AttachedAnnotation.cs
- SystemUnicastIPAddressInformation.cs
- Selection.cs
- BamlLocalizableResource.cs
- GeometryHitTestParameters.cs