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
- BrowserTree.cs
- FontFamilyConverter.cs
- OleDbException.cs
- QueueProcessor.cs
- EnumerableRowCollection.cs
- SystemBrushes.cs
- ProcessModuleCollection.cs
- Preprocessor.cs
- RecordsAffectedEventArgs.cs
- NavigationPropertyEmitter.cs
- TerminateSequenceResponse.cs
- CommandDevice.cs
- TypeSystem.cs
- VisualBasicSettingsConverter.cs
- BitmapEffectvisualstate.cs
- MasterPageCodeDomTreeGenerator.cs
- GridViewUpdateEventArgs.cs
- ObjectDataSourceEventArgs.cs
- BrushValueSerializer.cs
- AbandonedMutexException.cs
- ClosureBinding.cs
- RelationalExpressions.cs
- ActivityTrace.cs
- ControlParameter.cs
- FastEncoderWindow.cs
- ConfigXmlElement.cs
- MimeParameterWriter.cs
- TextBoxBase.cs
- InteropEnvironment.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ProxyWebPartConnectionCollection.cs
- MasterPageBuildProvider.cs
- CodeExporter.cs
- DesignObjectWrapper.cs
- ViewGenerator.cs
- ListCollectionView.cs
- BlurEffect.cs
- PageAction.cs
- HtmlSelectionListAdapter.cs
- UnmanagedMarshal.cs
- CmsUtils.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- ModifierKeysConverter.cs
- EdmType.cs
- ContentPlaceHolder.cs
- AxisAngleRotation3D.cs
- EntityParameterCollection.cs
- VirtualDirectoryMappingCollection.cs
- PropertyGridEditorPart.cs
- MenuItem.cs
- CommonObjectSecurity.cs
- ScrollChrome.cs
- PropertyEmitter.cs
- FillErrorEventArgs.cs
- QueueProcessor.cs
- PolyBezierSegment.cs
- ToolStripPanel.cs
- BackStopAuthenticationModule.cs
- validationstate.cs
- ComponentResourceKeyConverter.cs
- EventRoute.cs
- WebPartEditorApplyVerb.cs
- BufferedStream2.cs
- PropertyStore.cs
- EntityDataSourceView.cs
- Pen.cs
- ParserHooks.cs
- CompressedStack.cs
- Brush.cs
- DataServiceProcessingPipelineEventArgs.cs
- ConfigurationValidatorAttribute.cs
- ObjectReaderCompiler.cs
- Models.cs
- KeyNotFoundException.cs
- EntityExpressionVisitor.cs
- EmptyStringExpandableObjectConverter.cs
- SubstitutionList.cs
- ProcessThreadDesigner.cs
- PerformanceCounterPermission.cs
- TerminateWorkflow.cs
- DictionaryCustomTypeDescriptor.cs
- ProcessInputEventArgs.cs
- Win32.cs
- PartialCachingAttribute.cs
- ChtmlTextWriter.cs
- DataGrid.cs
- CurrentChangingEventManager.cs
- SchemaType.cs
- TextParagraphProperties.cs
- Roles.cs
- FrameSecurityDescriptor.cs
- AssemblyHash.cs
- Command.cs
- BorderGapMaskConverter.cs
- KerberosRequestorSecurityToken.cs
- XmlNode.cs
- validationstate.cs
- ManipulationCompletedEventArgs.cs
- EventManager.cs
- HMACRIPEMD160.cs