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
- HttpApplicationFactory.cs
- DataSourceXmlTextReader.cs
- RequestCachePolicyConverter.cs
- PackagePart.cs
- HttpHeaderCollection.cs
- ConnectionStringSettingsCollection.cs
- AppSettingsReader.cs
- EntityPropertyMappingAttribute.cs
- DbException.cs
- GlobalProxySelection.cs
- TemplateControl.cs
- RegexReplacement.cs
- SupportingTokenSecurityTokenResolver.cs
- WindowsHyperlink.cs
- MobileListItem.cs
- Vector3D.cs
- Dynamic.cs
- xml.cs
- LeftCellWrapper.cs
- UriParserTemplates.cs
- TableLayoutRowStyleCollection.cs
- XsdBuilder.cs
- WSFederationHttpBinding.cs
- AssociationSet.cs
- DictionaryKeyPropertyAttribute.cs
- XmlSiteMapProvider.cs
- Schema.cs
- HtmlTableRowCollection.cs
- CfgRule.cs
- FormViewPagerRow.cs
- TransactionScopeDesigner.cs
- BrowserTree.cs
- StatusBarAutomationPeer.cs
- SynchronizingStream.cs
- DbConnectionPoolGroup.cs
- PaintValueEventArgs.cs
- DbParameterCollectionHelper.cs
- ModelProperty.cs
- PageVisual.cs
- SoapAttributes.cs
- UserCancellationException.cs
- NumericUpDownAcceleration.cs
- ObfuscationAttribute.cs
- TypeConverterHelper.cs
- ForwardPositionQuery.cs
- WCFServiceClientProxyGenerator.cs
- RequestContext.cs
- Hashtable.cs
- CreateUserErrorEventArgs.cs
- ExceptionUtil.cs
- DataRowComparer.cs
- InternalEnumValidator.cs
- ReadOnlyCollectionBase.cs
- SqlCacheDependencyDatabaseCollection.cs
- RegisteredHiddenField.cs
- DrawingServices.cs
- WebPartCatalogCloseVerb.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ConstructorArgumentAttribute.cs
- ProfileSettingsCollection.cs
- IssuedSecurityTokenProvider.cs
- StrokeNode.cs
- PointHitTestParameters.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- TextServicesHost.cs
- TreeView.cs
- SqlConnectionManager.cs
- TableLayoutColumnStyleCollection.cs
- TraversalRequest.cs
- DBCSCodePageEncoding.cs
- TypeExtension.cs
- TreeViewDesigner.cs
- KnownBoxes.cs
- OracleNumber.cs
- SyndicationCategory.cs
- ObjectQueryExecutionPlan.cs
- KeyFrames.cs
- dataobject.cs
- ViewGenerator.cs
- _DigestClient.cs
- PermissionToken.cs
- ContentType.cs
- AudioSignalProblemOccurredEventArgs.cs
- TreeSet.cs
- SetState.cs
- ObjectStateManagerMetadata.cs
- DataGridViewColumnConverter.cs
- DirtyTextRange.cs
- EndPoint.cs
- InheritablePropertyChangeInfo.cs
- FieldBuilder.cs
- TextElement.cs
- MachineKeyValidationConverter.cs
- CompModSwitches.cs
- IncrementalReadDecoders.cs
- Msec.cs
- SafeTokenHandle.cs
- DiagnosticsConfiguration.cs
- SoapTypeAttribute.cs