Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / Win32Providers / MS / Internal / AutomationProxies / WindowsToolbarAsMenu.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ScriptReferenceBase.cs
- FileIOPermission.cs
- EllipticalNodeOperations.cs
- XMLSyntaxException.cs
- ToolStripItemCollection.cs
- JsonReaderDelegator.cs
- ByteStream.cs
- WorkflowMarkupSerializationManager.cs
- HttpCacheParams.cs
- VarRemapper.cs
- DependencyObjectProvider.cs
- WindowsListViewGroupHelper.cs
- grammarelement.cs
- DockPanel.cs
- DetailsViewUpdatedEventArgs.cs
- DispatcherHooks.cs
- EnumType.cs
- FontWeightConverter.cs
- Point4DConverter.cs
- COM2PictureConverter.cs
- ETagAttribute.cs
- CacheOutputQuery.cs
- ReaderOutput.cs
- HtmlLink.cs
- RectangleGeometry.cs
- DataColumnChangeEvent.cs
- Timer.cs
- SqlBooleanizer.cs
- CapabilitiesPattern.cs
- securestring.cs
- ToolStrip.cs
- UnaryNode.cs
- OdbcParameterCollection.cs
- KeyedCollection.cs
- ImageResources.Designer.cs
- TreeNodeConverter.cs
- DataGridViewCellValidatingEventArgs.cs
- ThicknessAnimation.cs
- ByeOperationCD1AsyncResult.cs
- Operator.cs
- ReadOnlyDataSourceView.cs
- ChildDocumentBlock.cs
- AuthorizationRuleCollection.cs
- Bezier.cs
- ToolStripSystemRenderer.cs
- QilLiteral.cs
- AppSettingsSection.cs
- WindowInteropHelper.cs
- DataGridAutoFormat.cs
- PeerDefaultCustomResolverClient.cs
- ListManagerBindingsCollection.cs
- DateTime.cs
- IndependentAnimationStorage.cs
- SlotInfo.cs
- ContractsBCL.cs
- CompilerError.cs
- SafeNativeMethods.cs
- GeometryHitTestParameters.cs
- ChtmlImageAdapter.cs
- VariantWrapper.cs
- HuffmanTree.cs
- autovalidator.cs
- BitmapEffectGroup.cs
- ScriptingScriptResourceHandlerSection.cs
- ConfigurationValue.cs
- EmptyReadOnlyDictionaryInternal.cs
- ToolstripProfessionalRenderer.cs
- MD5CryptoServiceProvider.cs
- ZipArchive.cs
- NetNamedPipeBinding.cs
- SiteIdentityPermission.cs
- webclient.cs
- SchemaInfo.cs
- Invariant.cs
- ExeContext.cs
- Vector3DConverter.cs
- UrlMappingsSection.cs
- TreeIterator.cs
- HighlightComponent.cs
- DataSourceCacheDurationConverter.cs
- ReturnType.cs
- CorrelationToken.cs
- ObjectDisposedException.cs
- ExcludeFromCodeCoverageAttribute.cs
- LinkDescriptor.cs
- FrugalList.cs
- HttpModuleActionCollection.cs
- DataBindingHandlerAttribute.cs
- ConfigViewGenerator.cs
- RMEnrollmentPage2.cs
- ServiceRouteHandler.cs
- Stream.cs
- StringUtil.cs
- ObjectDataSourceDisposingEventArgs.cs
- UserInitiatedNavigationPermission.cs
- UIElement3DAutomationPeer.cs
- TransportDefaults.cs
- TemplateControlBuildProvider.cs
- MenuItem.cs
- EntitySqlQueryCacheEntry.cs