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
- SpotLight.cs
- XmlArrayItemAttributes.cs
- PinnedBufferMemoryStream.cs
- SystemNetHelpers.cs
- DateTimeUtil.cs
- UpdateExpressionVisitor.cs
- LinkClickEvent.cs
- SQLMoney.cs
- ExtenderControl.cs
- Compress.cs
- XmlSchemaSearchPattern.cs
- _ConnectionGroup.cs
- ScriptResourceHandler.cs
- BufferedGraphics.cs
- ControlEvent.cs
- WorkflowInstanceExtensionProvider.cs
- InlineObject.cs
- AccessibilityHelperForVista.cs
- TextProperties.cs
- UnitySerializationHolder.cs
- CombinedGeometry.cs
- VirtualizingPanel.cs
- Decorator.cs
- HierarchicalDataSourceDesigner.cs
- DataSourceView.cs
- DESCryptoServiceProvider.cs
- DataGridItem.cs
- ScrollProperties.cs
- ButtonBaseAdapter.cs
- ExpressionBinding.cs
- NominalTypeEliminator.cs
- FrameworkContentElement.cs
- Accessors.cs
- AssociationEndMember.cs
- InheritanceRules.cs
- RowSpanVector.cs
- WebPartZone.cs
- LinkedResourceCollection.cs
- ECDiffieHellmanCngPublicKey.cs
- ResourceFallbackManager.cs
- HostingMessageProperty.cs
- BitmapMetadataBlob.cs
- AnimationClockResource.cs
- QueryTaskGroupState.cs
- ProcessModuleCollection.cs
- LinearKeyFrames.cs
- EnvironmentPermission.cs
- Rotation3D.cs
- PerfService.cs
- OdbcErrorCollection.cs
- FontFamily.cs
- ViewStateException.cs
- StringAnimationUsingKeyFrames.cs
- xamlnodes.cs
- InfiniteTimeSpanConverter.cs
- ShellProvider.cs
- AssignDesigner.xaml.cs
- CqlBlock.cs
- StaticTextPointer.cs
- DataRelationCollection.cs
- XmlComment.cs
- SoundPlayerAction.cs
- ManagedFilter.cs
- Keyboard.cs
- TabControl.cs
- Formatter.cs
- SpecialTypeDataContract.cs
- MissingMethodException.cs
- AssemblyBuilder.cs
- SqlUtil.cs
- PostBackOptions.cs
- LayoutSettings.cs
- HttpCachePolicy.cs
- SemaphoreSecurity.cs
- MessageBodyDescription.cs
- ValidatedControlConverter.cs
- ProvideValueServiceProvider.cs
- login.cs
- GenericPrincipal.cs
- DateTimeConverter2.cs
- ContextProperty.cs
- ListQueryResults.cs
- UrlAuthFailedErrorFormatter.cs
- ObjectItemCollection.cs
- CounterSetInstanceCounterDataSet.cs
- WindowsRichEditRange.cs
- ThemeInfoAttribute.cs
- TableLayoutColumnStyleCollection.cs
- EventTrigger.cs
- BindingContext.cs
- DataGridViewTextBoxCell.cs
- PropertyValueChangedEvent.cs
- RadioButtonAutomationPeer.cs
- PenLineCapValidation.cs
- ResourceKey.cs
- BamlLocalizabilityResolver.cs
- StylusLogic.cs
- AssociatedControlConverter.cs
- OleDbParameterCollection.cs
- Util.cs