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
- QuotedPrintableStream.cs
- PropertyPanel.cs
- Viewport3DVisual.cs
- GB18030Encoding.cs
- XmlSchemaObject.cs
- FileNotFoundException.cs
- TabletDevice.cs
- DateTimeConverter.cs
- PageAsyncTask.cs
- CachedCompositeFamily.cs
- NotifyInputEventArgs.cs
- __FastResourceComparer.cs
- DataGridViewCellStyle.cs
- DesignerActionList.cs
- TreeNodeConverter.cs
- XPathDescendantIterator.cs
- SecurityTokenProvider.cs
- UIElement3D.cs
- TypeNameConverter.cs
- ToolboxBitmapAttribute.cs
- ThicknessAnimationUsingKeyFrames.cs
- WebPartVerbsEventArgs.cs
- BitmapEffectInputData.cs
- PropertyFilterAttribute.cs
- ResolveCompletedEventArgs.cs
- WebPartEventArgs.cs
- BindingOperations.cs
- UserUseLicenseDictionaryLoader.cs
- FixedDSBuilder.cs
- Internal.cs
- TextRunCache.cs
- InfoCardBinaryReader.cs
- TablePatternIdentifiers.cs
- IisTraceWebEventProvider.cs
- entityreference_tresulttype.cs
- TimeSpanValidator.cs
- MimeParameterWriter.cs
- JoinQueryOperator.cs
- Window.cs
- CodeValidator.cs
- PrivateFontCollection.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- MetadataSerializer.cs
- IdleTimeoutMonitor.cs
- ModelVisual3D.cs
- XmlTextWriter.cs
- CodeDirectionExpression.cs
- NumberSubstitution.cs
- GlyphInfoList.cs
- BufferBuilder.cs
- ModelVisual3D.cs
- Task.cs
- Maps.cs
- FontFamily.cs
- ValueChangedEventManager.cs
- CookieProtection.cs
- HttpSessionStateBase.cs
- XmlDocument.cs
- ColumnResult.cs
- StrokeCollection.cs
- AppDomainUnloadedException.cs
- MetadataArtifactLoader.cs
- DataContext.cs
- HttpResponseHeader.cs
- NameScopePropertyAttribute.cs
- MSHTMLHostUtil.cs
- BindingSource.cs
- StylusButton.cs
- XmlDataProvider.cs
- DataPagerFieldCollection.cs
- HttpChannelBindingToken.cs
- PreloadHost.cs
- EdmTypeAttribute.cs
- UnsafeNativeMethods.cs
- ElementMarkupObject.cs
- AsyncResult.cs
- ScrollBar.cs
- DesignSurfaceServiceContainer.cs
- XPathSelfQuery.cs
- OptimizedTemplateContent.cs
- BinaryObjectReader.cs
- DbProviderServices.cs
- GreaterThanOrEqual.cs
- PropertyGeneratedEventArgs.cs
- StringExpressionSet.cs
- ResourceReader.cs
- ScopelessEnumAttribute.cs
- RNGCryptoServiceProvider.cs
- BindingMAnagerBase.cs
- SqlDataSourceSelectingEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- DashStyle.cs
- StandardBindingImporter.cs
- LayoutTableCell.cs
- ModelPerspective.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ListBoxItemAutomationPeer.cs
- DocumentPageView.cs
- ViewStateChangedEventArgs.cs