Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / TableLayoutPanelResizeGlyph.cs / 1 / TableLayoutPanelResizeGlyph.cs
namespace System.Windows.Forms.Design.Behavior { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; ////// /// This glyph is associated with every row/column line rendered by the TableLayouPanelDesigner. // Each glyph simply tracks the bounds, type (row or column), and row/col style that it is associated // with. All glyphs on a TableLayoutPanelDesigner share one instance of the TableLayoutPanelBehavior. /// internal class TableLayoutPanelResizeGlyph : Glyph { private Rectangle bounds;//bounds of the column/row line private Cursor hitTestCursor;//cursor used for hittesting - vsplit/hsplit private TableLayoutStyle style;//the style (row or column) associated private TableLayoutResizeType type;//the "Type" used by the Behavior for resizing ////// /// This constructor caches our necessary state and determine what 'type' /// it is. /// internal TableLayoutPanelResizeGlyph (Rectangle controlBounds, TableLayoutStyle style, Cursor hitTestCursor, Behavior behavior) : base(behavior) { this.bounds = controlBounds; this.hitTestCursor = hitTestCursor; this.style = style; if (style is ColumnStyle) { type = TableLayoutResizeType.Column; } else { type = TableLayoutResizeType.Row; } } ////// /// Represents the bounds of the row or column line being rendered /// by the TableLayoutPanelDesigner. /// public override Rectangle Bounds { get { return bounds; } } ////// /// Represents the Style associated with this glyph: Row or Column. /// This is used by the behaviors resize methods to set the values. /// public TableLayoutStyle Style { get { return style; } } ////// /// Used as quick check by our behavior when dragging/resizing. /// public TableLayoutResizeType Type { get { return type; } } ////// /// Simply returns the proper cursor if the mouse pointer is within /// our cached boudns. /// public override Cursor GetHitTest(Point p) { if (bounds.Contains(p)) { return hitTestCursor; } return null; } ////// /// No painting necessary - this glyph is more of a 'hot spot' /// public override void Paint(PaintEventArgs pe) { } ////// /// Internal Enum defining the two different types of glyphs a TableLayoutPanel /// can have: column or row. /// public enum TableLayoutResizeType { Column, Row } } } // 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
- SqlDataSourceCache.cs
- clipboard.cs
- RegistryExceptionHelper.cs
- SessionState.cs
- PlainXmlWriter.cs
- CodePageUtils.cs
- ExpressionContext.cs
- SafeLibraryHandle.cs
- PackageRelationshipSelector.cs
- CreateRefExpr.cs
- NamedPermissionSet.cs
- EntityUtil.cs
- Soap12FormatExtensions.cs
- ViewPort3D.cs
- RegexGroup.cs
- SemanticAnalyzer.cs
- EndpointInstanceProvider.cs
- WebPartEventArgs.cs
- TextElementEnumerator.cs
- COM2ExtendedTypeConverter.cs
- InputScopeManager.cs
- Trace.cs
- ListMarkerLine.cs
- ProcessHostConfigUtils.cs
- UTF32Encoding.cs
- ProfessionalColors.cs
- LayoutManager.cs
- XslAst.cs
- AppSettingsSection.cs
- Point.cs
- ConfigurationConverterBase.cs
- TableSectionStyle.cs
- CodeAttachEventStatement.cs
- PipeStream.cs
- ParsedAttributeCollection.cs
- CodeDelegateInvokeExpression.cs
- AttachedPropertyMethodSelector.cs
- SessionEndingCancelEventArgs.cs
- InfiniteIntConverter.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- ContainsRowNumberChecker.cs
- GlyphTypeface.cs
- KeyInterop.cs
- InputScopeManager.cs
- ControlDesignerState.cs
- WindowsRichEditRange.cs
- RegisteredScript.cs
- GeometryHitTestResult.cs
- XmlAttributes.cs
- DataComponentGenerator.cs
- ApplicationTrust.cs
- XPathNodeHelper.cs
- AssociativeAggregationOperator.cs
- VirtualPathUtility.cs
- UnsafeNativeMethods.cs
- DodSequenceMerge.cs
- Automation.cs
- EditorOptionAttribute.cs
- ScriptControlDescriptor.cs
- DrawTreeNodeEventArgs.cs
- TraceLevelStore.cs
- ExtentCqlBlock.cs
- Crypto.cs
- SafeLocalMemHandle.cs
- Tuple.cs
- EntityClassGenerator.cs
- DefaultMemberAttribute.cs
- DependencyStoreSurrogate.cs
- GridViewSelectEventArgs.cs
- ApplicationManager.cs
- EllipseGeometry.cs
- HttpMethodConstraint.cs
- ComboBoxItem.cs
- ListViewItemSelectionChangedEvent.cs
- IntAverageAggregationOperator.cs
- ComponentConverter.cs
- WorkflowDesigner.cs
- SSmlParser.cs
- WizardForm.cs
- HashJoinQueryOperatorEnumerator.cs
- ProbeDuplex11AsyncResult.cs
- CrossAppDomainChannel.cs
- PersonalizationProviderHelper.cs
- SkewTransform.cs
- CodeParameterDeclarationExpression.cs
- ComponentCommands.cs
- indexingfiltermarshaler.cs
- CodeCommentStatement.cs
- DataPagerFieldItem.cs
- TransactionFlowProperty.cs
- Zone.cs
- GroupBoxRenderer.cs
- _emptywebproxy.cs
- ZipIOLocalFileDataDescriptor.cs
- PolyBezierSegment.cs
- AlphabeticalEnumConverter.cs
- CheckableControlBaseAdapter.cs
- ZoneMembershipCondition.cs
- AssemblyBuilder.cs
- DocumentXmlWriter.cs