Code:
/ DotNET / DotNET / 8.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
- EventProxy.cs
- FileDetails.cs
- PropertyGridDesigner.cs
- ViewBase.cs
- XamlStyleSerializer.cs
- ErrorFormatter.cs
- WebPermission.cs
- WriteLineDesigner.xaml.cs
- COM2ExtendedUITypeEditor.cs
- MultiSelectRootGridEntry.cs
- SemaphoreFullException.cs
- WaitHandle.cs
- CustomErrorCollection.cs
- Int32AnimationBase.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SdlChannelSink.cs
- HTMLTextWriter.cs
- OperationAbortedException.cs
- ConfigurationManagerInternalFactory.cs
- LongCountAggregationOperator.cs
- Validator.cs
- CheckBoxField.cs
- KnownIds.cs
- HttpWebRequest.cs
- XmlQuerySequence.cs
- GlobalItem.cs
- control.ime.cs
- AvtEvent.cs
- SpeechUI.cs
- GridViewRowPresenterBase.cs
- MissingManifestResourceException.cs
- DistributedTransactionPermission.cs
- DependentList.cs
- SqlFacetAttribute.cs
- SystemIcmpV6Statistics.cs
- NotImplementedException.cs
- DataPointer.cs
- HttpProcessUtility.cs
- SqlConnection.cs
- DesigntimeLicenseContextSerializer.cs
- Pair.cs
- CodeSnippetTypeMember.cs
- OleDbRowUpdatingEvent.cs
- CheckBoxBaseAdapter.cs
- CollectionExtensions.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- AssertSection.cs
- DetailsViewUpdateEventArgs.cs
- DependsOnAttribute.cs
- GAC.cs
- InplaceBitmapMetadataWriter.cs
- EditorZoneBase.cs
- DataGridState.cs
- ExpressionLexer.cs
- SqlEnums.cs
- ListViewSelectEventArgs.cs
- COAUTHINFO.cs
- WinEventQueueItem.cs
- srgsitem.cs
- HostingEnvironment.cs
- MasterPage.cs
- Constants.cs
- connectionpool.cs
- StringAnimationUsingKeyFrames.cs
- SystemGatewayIPAddressInformation.cs
- CompilerGeneratedAttribute.cs
- StateMachineSubscription.cs
- MimeReturn.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- StylusButtonEventArgs.cs
- XhtmlMobileTextWriter.cs
- XsltArgumentList.cs
- TreeView.cs
- ISFTagAndGuidCache.cs
- LazyTextWriterCreator.cs
- HttpTransportSecurityElement.cs
- XamlTemplateSerializer.cs
- XamlStream.cs
- CustomTypeDescriptor.cs
- ServiceModelStringsVersion1.cs
- GlyphTypeface.cs
- DataObjectAttribute.cs
- RequestCacheEntry.cs
- SafeViewOfFileHandle.cs
- OracleInternalConnection.cs
- CommonObjectSecurity.cs
- GenerateScriptTypeAttribute.cs
- BamlResourceDeserializer.cs
- InternalResources.cs
- RuntimeWrappedException.cs
- InvalidOperationException.cs
- SrgsRulesCollection.cs
- XmlChildNodes.cs
- CharacterMetrics.cs
- ObjectDataSourceDesigner.cs
- SimpleRecyclingCache.cs
- GradientStopCollection.cs
- _SslSessionsCache.cs
- ValidationErrorEventArgs.cs
- TypedRowHandler.cs