Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- SharedStatics.cs
- HtmlInputControl.cs
- AsmxEndpointPickerExtension.cs
- ByteViewer.cs
- SqlDuplicator.cs
- WebPartDisplayModeCancelEventArgs.cs
- ReadOnlyDataSource.cs
- DataGridBoolColumn.cs
- EndOfStreamException.cs
- MetadataArtifactLoaderResource.cs
- Shape.cs
- DBBindings.cs
- ApplicationManager.cs
- _LazyAsyncResult.cs
- WebConfigurationHost.cs
- ParserOptions.cs
- SqlClientPermission.cs
- CorrelationResolver.cs
- CatalogPartChrome.cs
- QuotedPrintableStream.cs
- CodeTypeMemberCollection.cs
- TypedElement.cs
- RoleManagerModule.cs
- MobileTemplatedControlDesigner.cs
- Canvas.cs
- Canvas.cs
- SqlRewriteScalarSubqueries.cs
- SqlUdtInfo.cs
- SqlUnionizer.cs
- Fonts.cs
- NonParentingControl.cs
- RectValueSerializer.cs
- Compiler.cs
- IndicFontClient.cs
- Not.cs
- ManagementEventArgs.cs
- FormatterConverter.cs
- UncommonField.cs
- PortCache.cs
- CommonRemoteMemoryBlock.cs
- XmlCompatibilityReader.cs
- AttributeUsageAttribute.cs
- StylusPointProperty.cs
- DbMetaDataCollectionNames.cs
- AgileSafeNativeMemoryHandle.cs
- WebPartsSection.cs
- RowType.cs
- SqlCaseSimplifier.cs
- CryptographicAttribute.cs
- WebReferencesBuildProvider.cs
- Select.cs
- SmtpFailedRecipientException.cs
- cookieexception.cs
- XXXInfos.cs
- StylusPointCollection.cs
- TeredoHelper.cs
- ServiceDocumentFormatter.cs
- StreamGeometry.cs
- FileRegion.cs
- BridgeDataReader.cs
- DataStreams.cs
- CriticalFinalizerObject.cs
- WebUtil.cs
- Error.cs
- DifferencingCollection.cs
- ServiceModelInstallComponent.cs
- ToolStripSplitButton.cs
- DefaultHttpHandler.cs
- ScriptingSectionGroup.cs
- AspNetSynchronizationContext.cs
- ClientScriptManager.cs
- MethodBuilderInstantiation.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- SafeHandle.cs
- RowsCopiedEventArgs.cs
- DelegateSerializationHolder.cs
- StatusBarDrawItemEvent.cs
- AttachmentCollection.cs
- StylusPointProperties.cs
- Validator.cs
- CaseCqlBlock.cs
- ReferencedAssemblyResolver.cs
- InArgument.cs
- Nullable.cs
- LoadWorkflowByInstanceKeyCommand.cs
- Conditional.cs
- DropTarget.cs
- XmlSerializableServices.cs
- Restrictions.cs
- ObservableDictionary.cs
- ToolStripItem.cs
- FilterElement.cs
- StickyNoteHelper.cs
- ColumnClickEvent.cs
- DurationConverter.cs
- ComponentDispatcher.cs
- BaseEntityWrapper.cs
- GraphicsState.cs
- VerificationAttribute.cs
- HtmlToClrEventProxy.cs