Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ToolStripContentPanelDesigner.cs / 1 / ToolStripContentPanelDesigner.cs
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.ToolStripContentPanelDesigner..ctor()")] namespace System.Windows.Forms.Design { using System.Design; using System.Runtime.InteropServices; using System.ComponentModel; using System.Collections; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Design; using System.Windows.Forms; using Microsoft.Win32; using System.Windows.Forms.Design.Behavior; internal class ToolStripContentPanelDesigner : PanelDesigner { private BaseContextMenuStrip contextMenu; private ContextMenuStrip DesignerContextMenu { get { if (contextMenu == null) { contextMenu = new BaseContextMenuStrip(Component.Site, Component as Component); // If multiple Items Selected dont show the custom properties... contextMenu.GroupOrdering.Clear(); contextMenu.GroupOrdering.AddRange(new string[] { StandardGroups.Code, StandardGroups.Verbs, StandardGroups.Custom, StandardGroups.Selection, StandardGroups.Edit, StandardGroups.Properties}); contextMenu.Text = "CustomContextMenu"; } return contextMenu; } } public override IList SnapLines { get { // We don't want margin snaplines, so call directly to the internal method. ArrayList snapLines = null; AddPaddingSnapLines(ref snapLines); return snapLines; } } public override bool CanBeParentedTo(IDesigner parentDesigner) { return false; } protected override void OnContextMenu(int x, int y) { ToolStripContentPanel panel = Component as ToolStripContentPanel; if (panel != null && panel.Parent is ToolStripContainer) { DesignerContextMenu.Show(x, y); } else { base.OnContextMenu(x, y); } } protected override void PreFilterEvents(IDictionary events) { base.PreFilterEvents(events); EventDescriptor evnt; string[] noBrowseEvents = new string[] { "BindingContextChanged", "ChangeUICues", "ClientSizeChanged", "EnabledChanged", "FontChanged", "ForeColorChanged", "GiveFeedback", "ImeModeChanged", "Move", "QueryAccessibilityHelp", "Validated", "Validating", "VisibleChanged", }; for (int i = 0; i < noBrowseEvents.Length; i++) { evnt = (EventDescriptor)events[noBrowseEvents[i]]; if (evnt != null) { events[noBrowseEvents[i]] = TypeDescriptor.CreateEvent(evnt.ComponentType, evnt, BrowsableAttribute.No); } } } } } // 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
- ValueSerializer.cs
- ImageClickEventArgs.cs
- CalendarSelectionChangedEventArgs.cs
- ProcessStartInfo.cs
- ContractUtils.cs
- CodeDomExtensionMethods.cs
- SHA384.cs
- BitmapEffect.cs
- CrossSiteScriptingValidation.cs
- SaveLedgerEntryRequest.cs
- DependencyStoreSurrogate.cs
- CopyAttributesAction.cs
- Identifier.cs
- Renderer.cs
- InstancePersistenceException.cs
- TextTreeUndo.cs
- DrawingDrawingContext.cs
- DataGridComponentEditor.cs
- Polyline.cs
- Pool.cs
- GlobalItem.cs
- CalendarButton.cs
- BufferModesCollection.cs
- ExpressionLexer.cs
- DataGridCellAutomationPeer.cs
- FrameworkContextData.cs
- XPathNodeInfoAtom.cs
- SequentialOutput.cs
- AlternateView.cs
- GatewayIPAddressInformationCollection.cs
- GenericTextProperties.cs
- SiteMapNodeItemEventArgs.cs
- EventLogPermissionEntry.cs
- StaticResourceExtension.cs
- XmlDictionaryReaderQuotasElement.cs
- QuaternionAnimation.cs
- ParallelTimeline.cs
- WbmpConverter.cs
- DataGridViewRowCancelEventArgs.cs
- ConfigXmlComment.cs
- DrawingCollection.cs
- ADConnectionHelper.cs
- LinkedResource.cs
- SqlColumnizer.cs
- DocumentViewerConstants.cs
- AnnotationHighlightLayer.cs
- IDQuery.cs
- IsolatedStorageFile.cs
- XmlILIndex.cs
- KeyValueConfigurationCollection.cs
- ParenthesizePropertyNameAttribute.cs
- XmlFormatWriterGenerator.cs
- Utils.cs
- ReadOnlyCollectionBase.cs
- XamlDesignerSerializationManager.cs
- CompositeFontInfo.cs
- WsdlExporter.cs
- EraserBehavior.cs
- Padding.cs
- GenericRootAutomationPeer.cs
- AsymmetricKeyExchangeDeformatter.cs
- NewArrayExpression.cs
- AssemblyFilter.cs
- PartialCachingControl.cs
- ReadOnlyPropertyMetadata.cs
- Light.cs
- WebFaultClientMessageInspector.cs
- LookupNode.cs
- Unit.cs
- Main.cs
- ShutDownListener.cs
- ISFClipboardData.cs
- AttributeCollection.cs
- XmlSchemaSimpleContentExtension.cs
- XmlSchemaProviderAttribute.cs
- FormatterServicesNoSerializableCheck.cs
- OleDbPermission.cs
- X509ChainElement.cs
- ToolboxItemAttribute.cs
- StsCommunicationException.cs
- IList.cs
- COSERVERINFO.cs
- Underline.cs
- DataColumnMappingCollection.cs
- FormatVersion.cs
- DataSvcMapFile.cs
- StyleConverter.cs
- TextElement.cs
- AnyReturnReader.cs
- TemplatePartAttribute.cs
- DataBindingCollection.cs
- ToolStripDropDownDesigner.cs
- InvalidOleVariantTypeException.cs
- TreePrinter.cs
- FileDataSourceCache.cs
- ProfileBuildProvider.cs
- BuilderElements.cs
- Operator.cs
- CutCopyPasteHelper.cs
- UserNamePasswordValidator.cs