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
- RuntimeEnvironment.cs
- WebEventTraceProvider.cs
- WindowsEditBoxRange.cs
- GlyphTypeface.cs
- MiniCustomAttributeInfo.cs
- NamespaceList.cs
- StringInfo.cs
- sqlmetadatafactory.cs
- PrimaryKeyTypeConverter.cs
- ScriptManagerProxy.cs
- MemberDomainMap.cs
- XmlLanguageConverter.cs
- AbandonedMutexException.cs
- validationstate.cs
- CharAnimationBase.cs
- TableLayout.cs
- CalendarButtonAutomationPeer.cs
- EndpointReference.cs
- HtmlInputButton.cs
- DataGridViewCellStateChangedEventArgs.cs
- CommandConverter.cs
- HttpCacheParams.cs
- HostedTransportConfigurationManager.cs
- DateTimeConverter2.cs
- PolyLineSegmentFigureLogic.cs
- VisualTarget.cs
- ToolStripLabel.cs
- InvalidWMPVersionException.cs
- CroppedBitmap.cs
- CookieHandler.cs
- InternalBufferOverflowException.cs
- AnnotationAdorner.cs
- AsyncCallback.cs
- WSTrust.cs
- CalculatedColumn.cs
- WrappedDispatcherException.cs
- CallId.cs
- SystemBrushes.cs
- DataGridViewDataConnection.cs
- BamlLocalizableResourceKey.cs
- ArgumentNullException.cs
- BindingMAnagerBase.cs
- XmlSchemaIdentityConstraint.cs
- SHA512.cs
- PluralizationServiceUtil.cs
- DataBoundLiteralControl.cs
- ToolStripContentPanel.cs
- XmlFormatWriterGenerator.cs
- Geometry3D.cs
- DrawingBrush.cs
- WebPartConnectVerb.cs
- GraphicsPathIterator.cs
- SoapRpcMethodAttribute.cs
- DesigntimeLicenseContextSerializer.cs
- ModuleBuilderData.cs
- WasHostedComPlusFactory.cs
- VariableAction.cs
- QilList.cs
- JsonMessageEncoderFactory.cs
- CodeArrayIndexerExpression.cs
- ToolStripGripRenderEventArgs.cs
- PathTooLongException.cs
- TextTreeRootNode.cs
- TypedTableBase.cs
- EntityCollection.cs
- MaterialGroup.cs
- GridViewUpdateEventArgs.cs
- InnerItemCollectionView.cs
- TypeLoadException.cs
- WebPartAuthorizationEventArgs.cs
- SoapAttributeOverrides.cs
- BindingManagerDataErrorEventArgs.cs
- VScrollProperties.cs
- FormView.cs
- XmlChildEnumerator.cs
- Flattener.cs
- PeerContact.cs
- IpcChannel.cs
- ThumbAutomationPeer.cs
- ContextMarshalException.cs
- ActivityExecutionFilter.cs
- DataViewSetting.cs
- DeferredRunTextReference.cs
- ValueQuery.cs
- ThemeDirectoryCompiler.cs
- Error.cs
- AppDomainEvidenceFactory.cs
- LongSumAggregationOperator.cs
- FontDifferentiator.cs
- StylusTip.cs
- LinqToSqlWrapper.cs
- WCFBuildProvider.cs
- KnownColorTable.cs
- FormattedTextSymbols.cs
- Highlights.cs
- ProviderConnectionPoint.cs
- WebResourceAttribute.cs
- PageSetupDialog.cs
- ValidationRuleCollection.cs
- ThumbAutomationPeer.cs