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
- Rectangle.cs
- ConfigurationLocationCollection.cs
- GroupBox.cs
- UnicastIPAddressInformationCollection.cs
- DesignerWebPartChrome.cs
- FixedTextContainer.cs
- ResXDataNode.cs
- PasswordBoxAutomationPeer.cs
- BuildProviderAppliesToAttribute.cs
- Rect3D.cs
- MatrixCamera.cs
- StronglyTypedResourceBuilder.cs
- StickyNoteHelper.cs
- OrderedDictionaryStateHelper.cs
- TraceLog.cs
- FormViewPageEventArgs.cs
- DockAndAnchorLayout.cs
- RecordManager.cs
- Tuple.cs
- PageCatalogPart.cs
- FileLogRecordStream.cs
- FileSecurity.cs
- ModuleBuilderData.cs
- TypeSystem.cs
- HelloMessageApril2005.cs
- storepermissionattribute.cs
- relpropertyhelper.cs
- TimersDescriptionAttribute.cs
- StorageAssociationTypeMapping.cs
- EntityDataSourceColumn.cs
- ListViewDesigner.cs
- indexingfiltermarshaler.cs
- SByteStorage.cs
- ExpressionValueEditor.cs
- FormatException.cs
- UnsafeCollabNativeMethods.cs
- TraceLog.cs
- MediaPlayerState.cs
- PropertyManager.cs
- PaintValueEventArgs.cs
- ToolStripProgressBar.cs
- SqlDataSourceFilteringEventArgs.cs
- GlyphRunDrawing.cs
- RuntimeConfig.cs
- CqlLexer.cs
- EventLogPermission.cs
- QuaternionAnimationUsingKeyFrames.cs
- CommonDialog.cs
- Span.cs
- StickyNoteAnnotations.cs
- KnownBoxes.cs
- ExecutionPropertyManager.cs
- SiteMapProvider.cs
- AppLevelCompilationSectionCache.cs
- XmlSchemaAnyAttribute.cs
- TrackingMemoryStreamFactory.cs
- StandardBindingImporter.cs
- ZipIOExtraField.cs
- RightsController.cs
- StreamAsIStream.cs
- XmlNodeChangedEventManager.cs
- KeyConstraint.cs
- ConfigPathUtility.cs
- FileDialog_Vista.cs
- TextRangeEdit.cs
- GeometryValueSerializer.cs
- KeyValueConfigurationCollection.cs
- ConfigsHelper.cs
- TextRenderer.cs
- SemaphoreSecurity.cs
- TypeUsage.cs
- AvTrace.cs
- DataColumnSelectionConverter.cs
- TextEditorTyping.cs
- PaperSource.cs
- TypeConverter.cs
- PageContentCollection.cs
- ScriptResourceInfo.cs
- ObjectHelper.cs
- CommandSet.cs
- DBCommand.cs
- HtmlFormAdapter.cs
- StickyNoteHelper.cs
- TypeRefElement.cs
- RadioButton.cs
- MessageQuerySet.cs
- SpeechSeg.cs
- CodePageEncoding.cs
- GroupItem.cs
- _SslState.cs
- SqlProvider.cs
- TimestampInformation.cs
- DataRowView.cs
- SimpleHandlerBuildProvider.cs
- ActivatedMessageQueue.cs
- CharAnimationUsingKeyFrames.cs
- UIElementParaClient.cs
- ZoneButton.cs
- ResXResourceSet.cs
- AmbientValueAttribute.cs