Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / LockedHandleGlyph.cs / 1 / LockedHandleGlyph.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; using System.Runtime.InteropServices; ////// /// The LockedHandleGlyph represents the handle for a non-resizeable control in our new seleciton /// model. Note that the pen and brush are created once per instance of this class /// and re-used in our painting logic for perf. reasonse. /// internal class LockedHandleGlyph : SelectionGlyphBase { private bool isPrimary = false; ////// /// LockedHandleGlyph's constructor takes additional parameters: 'type' and 'primary selection'. /// Also, we create/cache our pen & brush here to avoid this action with every paint message. /// internal LockedHandleGlyph(Rectangle controlBounds, bool primarySelection) : base(null) { isPrimary = primarySelection; hitTestCursor = Cursors.Default; rules = SelectionRules.None; bounds = new Rectangle((controlBounds.X + DesignerUtils.LOCKHANDLEOVERLAP) - DesignerUtils.LOCKHANDLEWIDTH, (controlBounds.Y + DesignerUtils.LOCKHANDLEOVERLAP) - DesignerUtils.LOCKHANDLEHEIGHT, DesignerUtils.LOCKHANDLEWIDTH, DesignerUtils.LOCKHANDLEHEIGHT); hitBounds = bounds; } ////// /// Very simple paint logic. /// public override void Paint(PaintEventArgs pe) { DesignerUtils.DrawLockedHandle(pe.Graphics, bounds, isPrimary, this); } } } // 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
- CacheForPrimitiveTypes.cs
- Font.cs
- XmlSecureResolver.cs
- dtdvalidator.cs
- RenderingBiasValidation.cs
- Group.cs
- SystemBrushes.cs
- StrongNameUtility.cs
- ExtensionDataReader.cs
- UnionCqlBlock.cs
- StringComparer.cs
- ToolStripRenderer.cs
- Repeater.cs
- GetWorkflowTree.cs
- DataGridViewSelectedColumnCollection.cs
- Package.cs
- TypeUsage.cs
- AccessibilityHelperForXpWin2k3.cs
- OciEnlistContext.cs
- ArrayList.cs
- HttpProcessUtility.cs
- AppSettingsExpressionBuilder.cs
- SemanticAnalyzer.cs
- PriorityQueue.cs
- XsltFunctions.cs
- BaseHashHelper.cs
- SoundPlayer.cs
- CodeExporter.cs
- HtmlInputPassword.cs
- HttpModuleAction.cs
- TdsParserSessionPool.cs
- ParameterInfo.cs
- BinaryObjectReader.cs
- NamespaceEmitter.cs
- WebPartMenu.cs
- CompiledRegexRunnerFactory.cs
- DataGridViewImageColumn.cs
- NamespaceInfo.cs
- ValidationHelper.cs
- DockProviderWrapper.cs
- PolygonHotSpot.cs
- UnmanagedBitmapWrapper.cs
- CanonicalizationDriver.cs
- ChainedAsyncResult.cs
- Rotation3D.cs
- PolyBezierSegment.cs
- PropertyChange.cs
- XmlComplianceUtil.cs
- TagNameToTypeMapper.cs
- ObjectComplexPropertyMapping.cs
- VisualSerializer.cs
- CacheEntry.cs
- ConnectionManagementSection.cs
- RIPEMD160Managed.cs
- ExpressionVisitor.cs
- PreviewControlDesigner.cs
- AxHost.cs
- TakeQueryOptionExpression.cs
- PersonalizationStateInfoCollection.cs
- CacheSection.cs
- UserControlFileEditor.cs
- ObjectItemCollection.cs
- OleDbTransaction.cs
- TaskHelper.cs
- SoapIncludeAttribute.cs
- InteropAutomationProvider.cs
- Bits.cs
- Avt.cs
- GridViewCommandEventArgs.cs
- ApplicationInterop.cs
- DataGridViewRowCancelEventArgs.cs
- BaseDataListComponentEditor.cs
- LayoutTable.cs
- ToolStripOverflowButton.cs
- RemotingServices.cs
- GridViewDeletedEventArgs.cs
- CreateUserErrorEventArgs.cs
- MemberAssignment.cs
- RijndaelManagedTransform.cs
- DynamicFilter.cs
- Win32PrintDialog.cs
- SqlUdtInfo.cs
- QueueProcessor.cs
- EntityContainerRelationshipSetEnd.cs
- Size.cs
- ImpersonationContext.cs
- UnsafeCollabNativeMethods.cs
- PerformanceCounterCategory.cs
- NumericUpDownAcceleration.cs
- TextEffectResolver.cs
- QilFactory.cs
- MultitargetUtil.cs
- DBCommandBuilder.cs
- IChannel.cs
- ObjectListShowCommandsEventArgs.cs
- IncomingWebResponseContext.cs
- OpenTypeLayout.cs
- SearchExpression.cs
- QueryRewriter.cs
- DispatcherObject.cs