Code:
/ DotNET / DotNET / 8.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
- EventMappingSettingsCollection.cs
- WebEventTraceProvider.cs
- CompilationPass2TaskInternal.cs
- WebPartManagerInternals.cs
- DesignerEditorPartChrome.cs
- WCFServiceClientProxyGenerator.cs
- _SafeNetHandles.cs
- NavigationFailedEventArgs.cs
- PeerNearMe.cs
- StateMachineDesignerPaint.cs
- MaskedTextProvider.cs
- VersionPair.cs
- ComboBox.cs
- MaskDescriptors.cs
- DbParameterCollectionHelper.cs
- MsmqTransportElement.cs
- LinqDataSourceContextData.cs
- PointAnimationClockResource.cs
- CodeObjectCreateExpression.cs
- TextureBrush.cs
- SqlRetyper.cs
- ReferenceSchema.cs
- InstanceNameConverter.cs
- HtmlHead.cs
- QilNode.cs
- XmlEventCache.cs
- SoapEnumAttribute.cs
- ManifestResourceInfo.cs
- ListCollectionView.cs
- MissingFieldException.cs
- UpdatePanel.cs
- DocumentPageViewAutomationPeer.cs
- CheckoutException.cs
- ToolBarTray.cs
- WindowsFormsSynchronizationContext.cs
- webclient.cs
- HasCopySemanticsAttribute.cs
- GlyphShapingProperties.cs
- LayoutTableCell.cs
- CharConverter.cs
- ConfigurationElementProperty.cs
- WsatAdminException.cs
- ReflectionTypeLoadException.cs
- QueryCursorEventArgs.cs
- ProfilePropertyMetadata.cs
- ImageSource.cs
- Splitter.cs
- PaintValueEventArgs.cs
- ToolStripItemCollection.cs
- GeometryHitTestParameters.cs
- SqlDataSourceWizardForm.cs
- EventWaitHandleSecurity.cs
- CodeChecksumPragma.cs
- GenericTextProperties.cs
- WebMessageBodyStyleHelper.cs
- FieldCollectionEditor.cs
- SafeLibraryHandle.cs
- UpdatePanelTrigger.cs
- BufferAllocator.cs
- WindowsPen.cs
- EntityDataSourceContainerNameConverter.cs
- DataObject.cs
- Converter.cs
- WebPartDisplayModeEventArgs.cs
- FreezableCollection.cs
- PropertyValueUIItem.cs
- EntityDataSourceValidationException.cs
- HostingEnvironmentException.cs
- PolyQuadraticBezierSegment.cs
- ItemPager.cs
- ProfileSettingsCollection.cs
- ValidationPropertyAttribute.cs
- PointHitTestResult.cs
- WebPartManager.cs
- BaseDataList.cs
- ExtentCqlBlock.cs
- unitconverter.cs
- SafeRightsManagementPubHandle.cs
- Rijndael.cs
- WebPartCollection.cs
- TableCell.cs
- CaseExpr.cs
- NullableIntAverageAggregationOperator.cs
- EFTableProvider.cs
- DecodeHelper.cs
- ConfigXmlElement.cs
- DaylightTime.cs
- WebBrowserNavigatedEventHandler.cs
- ContextMenu.cs
- AspNetCacheProfileAttribute.cs
- Positioning.cs
- DataGridViewColumn.cs
- _ConnectOverlappedAsyncResult.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ButtonAutomationPeer.cs
- QilDataSource.cs
- StrokeNode.cs
- BindingSource.cs
- FixedTextView.cs
- CodePropertyReferenceExpression.cs