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
- FrameworkElementFactory.cs
- TreeWalker.cs
- SerialReceived.cs
- ServiceInstanceProvider.cs
- JoinGraph.cs
- Publisher.cs
- ContextMenuStrip.cs
- TargetPerspective.cs
- TreeNodeCollectionEditor.cs
- HtmlInputText.cs
- AutoGeneratedFieldProperties.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- ServicePointManager.cs
- AppDomainManager.cs
- SqlTriggerAttribute.cs
- CollectionViewProxy.cs
- CodeRegionDirective.cs
- RegexGroup.cs
- GenericWebPart.cs
- XsltConvert.cs
- PerformanceCountersElement.cs
- EmptyEnumerator.cs
- EncoderFallback.cs
- SearchExpression.cs
- ValidationErrorCollection.cs
- ResourceExpression.cs
- MemoryMappedViewAccessor.cs
- ContentElement.cs
- HtmlHistory.cs
- GroupBoxRenderer.cs
- NativeMethods.cs
- BinaryMessageEncoder.cs
- ConfigurationStrings.cs
- CallbackValidatorAttribute.cs
- XmlSchemaInfo.cs
- UserControlAutomationPeer.cs
- ExtensionWindowResizeGrip.cs
- ReturnEventArgs.cs
- CommentEmitter.cs
- StrokeCollection.cs
- AppSecurityManager.cs
- GradientBrush.cs
- ZipIOLocalFileDataDescriptor.cs
- CatalogZoneBase.cs
- SimpleLine.cs
- XmlUtil.cs
- Scheduling.cs
- _NegotiateClient.cs
- DataSourceXmlSerializer.cs
- IconConverter.cs
- PagesChangedEventArgs.cs
- ExtensionSimplifierMarkupObject.cs
- QueryGenerator.cs
- SerialReceived.cs
- DictionaryBase.cs
- Socket.cs
- VirtualDirectoryMapping.cs
- Aggregates.cs
- HttpListenerException.cs
- GeneralTransform3DGroup.cs
- SystemColors.cs
- URL.cs
- WebMessageEncoderFactory.cs
- FixedSOMFixedBlock.cs
- DivideByZeroException.cs
- ScriptControlManager.cs
- HttpWebRequest.cs
- ParsedAttributeCollection.cs
- StreamInfo.cs
- DockingAttribute.cs
- EntityProviderFactory.cs
- Privilege.cs
- ArrayItemValue.cs
- activationcontext.cs
- PreviewPrintController.cs
- MDIWindowDialog.cs
- DataGridViewLayoutData.cs
- LineGeometry.cs
- InputBindingCollection.cs
- LogLogRecord.cs
- GridViewPageEventArgs.cs
- PerformanceCounterPermissionEntryCollection.cs
- TitleStyle.cs
- BinaryReader.cs
- dataprotectionpermission.cs
- ArrangedElement.cs
- CompileXomlTask.cs
- SingleStorage.cs
- WebMessageEncodingElement.cs
- URLIdentityPermission.cs
- InvokePatternIdentifiers.cs
- GraphicsState.cs
- MenuAutoFormat.cs
- ControlAdapter.cs
- HotCommands.cs
- HtmlElement.cs
- FormViewPageEventArgs.cs
- DataGridViewCellStateChangedEventArgs.cs
- SmiContext.cs
- CanExecuteRoutedEventArgs.cs