Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / AccessibleTech / longhorn / Automation / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProfileInfo.cs
- WorkflowMarkupSerializationManager.cs
- CodeMemberMethod.cs
- CompatibleComparer.cs
- mediaeventargs.cs
- EntityDataSourceContainerNameConverter.cs
- FrameworkContentElement.cs
- ServiceHostFactory.cs
- Thickness.cs
- Panel.cs
- Visitors.cs
- MSAAWinEventWrap.cs
- StrokeCollection.cs
- ThicknessAnimation.cs
- WebBrowser.cs
- RoutedEventValueSerializer.cs
- RoutedPropertyChangedEventArgs.cs
- HtmlInputCheckBox.cs
- CodeMemberField.cs
- QuaternionAnimationBase.cs
- SpotLight.cs
- XamlStackWriter.cs
- Animatable.cs
- StorageInfo.cs
- OutputCacheSettingsSection.cs
- DataServiceKeyAttribute.cs
- XmlWrappingReader.cs
- TypeUnloadedException.cs
- updatecommandorderer.cs
- CursorConverter.cs
- ChildrenQuery.cs
- RowUpdatingEventArgs.cs
- WebContext.cs
- SpellerHighlightLayer.cs
- ColorContextHelper.cs
- CryptoApi.cs
- ShutDownListener.cs
- DependencySource.cs
- ActivitiesCollection.cs
- UnsafeNativeMethods.cs
- OciEnlistContext.cs
- SoapClientMessage.cs
- CustomAttribute.cs
- CrossSiteScriptingValidation.cs
- XPathChildIterator.cs
- RelationshipEnd.cs
- CharacterMetricsDictionary.cs
- OptimalTextSource.cs
- DataObjectFieldAttribute.cs
- Pen.cs
- Policy.cs
- SqlMethodTransformer.cs
- SiteMapDataSourceView.cs
- DocumentPageViewAutomationPeer.cs
- UpdateRecord.cs
- ListViewCancelEventArgs.cs
- StringAttributeCollection.cs
- UnSafeCharBuffer.cs
- ListDictionary.cs
- DoubleConverter.cs
- MimeTypeMapper.cs
- IteratorDescriptor.cs
- ExeContext.cs
- ApplicationDirectory.cs
- AttachmentCollection.cs
- LeaseManager.cs
- Array.cs
- IDReferencePropertyAttribute.cs
- UriSection.cs
- MediaTimeline.cs
- PeerObject.cs
- SqlDataSourceTableQuery.cs
- Resources.Designer.cs
- AssertFilter.cs
- BigInt.cs
- ContentPresenter.cs
- TextServicesCompartmentContext.cs
- ResourceDefaultValueAttribute.cs
- Visual.cs
- ValidatorAttribute.cs
- Part.cs
- TypeLibConverter.cs
- XPathAncestorIterator.cs
- FileResponseElement.cs
- PackageRelationshipCollection.cs
- TemplateXamlParser.cs
- EncoderParameters.cs
- parserscommon.cs
- MetadataArtifactLoaderFile.cs
- LabelInfo.cs
- WebControlParameterProxy.cs
- EditBehavior.cs
- TargetConverter.cs
- ToolStripPanelRow.cs
- HMACSHA512.cs
- XmlSchemaSequence.cs
- HuffCodec.cs
- Style.cs
- TraceHandlerErrorFormatter.cs
- DrawingState.cs