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
- SecUtil.cs
- ScriptServiceAttribute.cs
- UIElement3D.cs
- DescendantBaseQuery.cs
- LicenseException.cs
- HtmlWindow.cs
- ExtractedStateEntry.cs
- AtomMaterializer.cs
- PathFigureCollection.cs
- Html32TextWriter.cs
- SecurityStandardsManager.cs
- Point3D.cs
- TypeToken.cs
- DynamicDataRouteHandler.cs
- GridViewRowCollection.cs
- XmlSerializationReader.cs
- SiteMapDataSource.cs
- VariableAction.cs
- DBParameter.cs
- EntityReference.cs
- CodeFieldReferenceExpression.cs
- SmiRequestExecutor.cs
- PageBuildProvider.cs
- XmlDataLoader.cs
- AmbientValueAttribute.cs
- OperationExecutionFault.cs
- ValidatingReaderNodeData.cs
- PnrpPermission.cs
- SQLUtility.cs
- BreakRecordTable.cs
- TemplatedControlDesigner.cs
- SizeIndependentAnimationStorage.cs
- PageCatalogPart.cs
- WebPartEditorApplyVerb.cs
- DataTemplateKey.cs
- ProfileSettingsCollection.cs
- TransactionBridgeSection.cs
- SecurityContextSecurityTokenParameters.cs
- TemplateKey.cs
- MultiTrigger.cs
- TypeListConverter.cs
- DynamicPropertyReader.cs
- DecoderExceptionFallback.cs
- SymmetricSecurityBindingElement.cs
- TableLayoutStyleCollection.cs
- SupportsEventValidationAttribute.cs
- XPathDocumentNavigator.cs
- XmlSchemaSimpleTypeUnion.cs
- RawStylusInputReport.cs
- DataGridViewTopRowAccessibleObject.cs
- ProxyElement.cs
- EdmSchemaError.cs
- XmlSchemaAll.cs
- MaskInputRejectedEventArgs.cs
- TreeViewItem.cs
- SmtpReplyReaderFactory.cs
- WeakReadOnlyCollection.cs
- log.cs
- InstanceLockTracking.cs
- ArrayHelper.cs
- AppDomainResourcePerfCounters.cs
- PlanCompiler.cs
- BinaryMessageEncodingBindingElement.cs
- DataSourceHelper.cs
- UITypeEditors.cs
- EdgeProfileValidation.cs
- ChangeTracker.cs
- PolicyReader.cs
- CodeSnippetExpression.cs
- PreservationFileReader.cs
- CodeConstructor.cs
- _SpnDictionary.cs
- Converter.cs
- ViewGenerator.cs
- CodeArrayCreateExpression.cs
- EdmFunctionAttribute.cs
- LayoutDump.cs
- DataGridToolTip.cs
- MediaTimeline.cs
- HiddenFieldPageStatePersister.cs
- AutomationProperties.cs
- MouseBinding.cs
- RecommendedAsConfigurableAttribute.cs
- WebRequest.cs
- SparseMemoryStream.cs
- HttpAsyncResult.cs
- DataKeyCollection.cs
- DictionaryTraceRecord.cs
- GridViewSelectEventArgs.cs
- EventLogInformation.cs
- FreezableOperations.cs
- util.cs
- OrderedDictionaryStateHelper.cs
- DataControlPagerLinkButton.cs
- DecimalAnimationBase.cs
- SignedInfo.cs
- DashStyles.cs
- DBConnection.cs
- RegexCharClass.cs
- DataProtection.cs