Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / TabPageDesigner.cs / 1 / TabPageDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.Design { using System.Diagnostics; using System.Collections; using System; using System.Drawing; using System.Windows.Forms; using Microsoft.Win32; using System.ComponentModel.Design; using System.Windows.Forms.Design.Behavior; using System.ComponentModel; ////// /// This is the designer for tap page controls. It inherits /// from the base control designer and adds live hit testing /// capabilites for the tree view control. /// internal class TabPageDesigner : PanelDesigner { ////// /// Determines if the this designer can be parented to the specified desinger -- /// generally this means if the control for this designer can be parented into the /// given ParentControlDesigner's designer. /// public override bool CanBeParentedTo(IDesigner parentDesigner) { return (parentDesigner != null && parentDesigner.Component is TabControl); } ////// /// Retrieves a set of rules concerning the movement capabilities of a component. /// This should be one or more flags from the SelectionRules class. If no designer /// provides rules for a component, the component will not get any UI services. /// public override SelectionRules SelectionRules { get { SelectionRules rules = base.SelectionRules; Control ctl = Control; if (ctl.Parent is TabControl) { rules &= ~SelectionRules.AllSizeable; } return rules; } } internal void OnDragDropInternal(DragEventArgs de) { OnDragDrop(de); } internal void OnDragEnterInternal(DragEventArgs de) { OnDragEnter(de); } internal void OnDragLeaveInternal(EventArgs e) { OnDragLeave(e); } internal void OnDragOverInternal(DragEventArgs e) { OnDragOver(e); } internal void OnGiveFeedbackInternal(GiveFeedbackEventArgs e) { OnGiveFeedback(e); } protected override ControlBodyGlyph GetControlGlyph(GlyphSelectionType selectionType) { // create a new body glyph with empty bounds. // this will keep incorrect tab pages from stealing drag/drop messages // which are now handled by the TabControlDesigner //get the right cursor for this component OnSetCursor(); Rectangle translatedBounds = Rectangle.Empty; //create our glyph, and set its cursor appropriately ControlBodyGlyph g = new ControlBodyGlyph(translatedBounds, Cursor.Current, Control, this); return g; } } } // 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
- PageParser.cs
- SpecialFolderEnumConverter.cs
- RequestBringIntoViewEventArgs.cs
- UserControlParser.cs
- UriTemplateClientFormatter.cs
- ReferenceConverter.cs
- PersistChildrenAttribute.cs
- CurrentChangingEventManager.cs
- TextSchema.cs
- ArithmeticException.cs
- BufferedReceiveElement.cs
- TextChange.cs
- cache.cs
- AuthenticationSection.cs
- DependencyObjectType.cs
- NullRuntimeConfig.cs
- BaseCodePageEncoding.cs
- NullableLongSumAggregationOperator.cs
- ApplyTemplatesAction.cs
- ExpandSegmentCollection.cs
- TableNameAttribute.cs
- ListenerSessionConnection.cs
- ListViewGroupConverter.cs
- AssociationTypeEmitter.cs
- StreamInfo.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- ExtendedPropertyDescriptor.cs
- ButtonChrome.cs
- DetailsViewRowCollection.cs
- PageCodeDomTreeGenerator.cs
- NamespaceInfo.cs
- ContentDisposition.cs
- TemplatedMailWebEventProvider.cs
- ContextQuery.cs
- DispatchOperationRuntime.cs
- TraceEventCache.cs
- OleDbCommand.cs
- OutKeywords.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- CdpEqualityComparer.cs
- BulletDecorator.cs
- AstTree.cs
- HtmlObjectListAdapter.cs
- ToolBarTray.cs
- QueuePathEditor.cs
- DBConnectionString.cs
- WebPartDisplayModeEventArgs.cs
- ProxyHwnd.cs
- XPathArrayIterator.cs
- PolicyValidationException.cs
- CodeIdentifiers.cs
- HScrollBar.cs
- DataSourceXmlAttributeAttribute.cs
- XmlTextWriter.cs
- ToolBarButtonClickEvent.cs
- HttpRequestCacheValidator.cs
- SrgsElementList.cs
- RelatedEnd.cs
- StickyNoteHelper.cs
- PreviewKeyDownEventArgs.cs
- MemberPath.cs
- TimeSpanParse.cs
- ExpressionBuilderContext.cs
- SocketCache.cs
- Int32CollectionConverter.cs
- TemplateBindingExtensionConverter.cs
- TextRangeBase.cs
- OdbcParameter.cs
- COM2PictureConverter.cs
- DotExpr.cs
- TypeResolvingOptions.cs
- SqlStream.cs
- FontResourceCache.cs
- Point3DIndependentAnimationStorage.cs
- RadioButtonFlatAdapter.cs
- UIAgentMonitorHandle.cs
- HtmlControl.cs
- NativeMethods.cs
- GenericTextProperties.cs
- Point3D.cs
- Font.cs
- WebPartCollection.cs
- DecoderExceptionFallback.cs
- DesignerDataConnection.cs
- SafeViewOfFileHandle.cs
- XmlSchemaAnnotation.cs
- ResXDataNode.cs
- NetSectionGroup.cs
- InstanceData.cs
- HMACSHA256.cs
- BrowserDefinition.cs
- ResourceReferenceExpressionConverter.cs
- SafeUserTokenHandle.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ErrorWebPart.cs
- ToolStripLocationCancelEventArgs.cs
- DataGridViewIntLinkedList.cs
- BinaryKeyIdentifierClause.cs
- NamedPipeConnectionPoolSettings.cs
- DataControlFieldCollection.cs