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
- UnsafeNativeMethods.cs
- BaseTemplateBuildProvider.cs
- TransactionContextManager.cs
- CommandID.cs
- NetworkInformationException.cs
- CriticalExceptions.cs
- PrintEvent.cs
- HttpPostedFileBase.cs
- DllNotFoundException.cs
- ValueTypeFixupInfo.cs
- ContainerVisual.cs
- WCFBuildProvider.cs
- TcpSocketManager.cs
- ObjectListItem.cs
- PageBuildProvider.cs
- SessionParameter.cs
- CodeDefaultValueExpression.cs
- Int32AnimationBase.cs
- ThousandthOfEmRealDoubles.cs
- SafeCertificateStore.cs
- unsafeIndexingFilterStream.cs
- ColorTransformHelper.cs
- RoleGroup.cs
- Util.cs
- ListView.cs
- WebPartVerb.cs
- StringFunctions.cs
- ServerValidateEventArgs.cs
- XmlSchemaFacet.cs
- ImageMap.cs
- RoleManagerModule.cs
- TraceData.cs
- DelegatingConfigHost.cs
- ZipIORawDataFileBlock.cs
- RichTextBoxConstants.cs
- ColorTransform.cs
- Triplet.cs
- GeneralTransform2DTo3D.cs
- CompilerTypeWithParams.cs
- HttpRuntimeSection.cs
- FunctionDescription.cs
- Transform3DGroup.cs
- Point4D.cs
- DataPagerFieldCollection.cs
- DataReaderContainer.cs
- PerformanceCounterTraceRecord.cs
- XmlAnyElementAttribute.cs
- XmlTextReader.cs
- StringDictionary.cs
- AutoResizedEvent.cs
- MultiSelector.cs
- DataContractJsonSerializer.cs
- NonBatchDirectoryCompiler.cs
- CompositeDispatchFormatter.cs
- TableParagraph.cs
- WindowHideOrCloseTracker.cs
- ServicePointManagerElement.cs
- ZeroOpNode.cs
- ResolveCriteriaCD1.cs
- MediaElement.cs
- OleDbPermission.cs
- DisplayNameAttribute.cs
- QuaternionRotation3D.cs
- FileLevelControlBuilderAttribute.cs
- VoiceObjectToken.cs
- PointAnimationUsingPath.cs
- RuntimeResourceSet.cs
- FileDialog.cs
- FieldDescriptor.cs
- WebRequest.cs
- SQLGuidStorage.cs
- VariableAction.cs
- ListView.cs
- AuthenticationModuleElementCollection.cs
- MatrixAnimationUsingPath.cs
- CardSpaceException.cs
- _SecureChannel.cs
- While.cs
- DocumentApplicationJournalEntry.cs
- ElementFactory.cs
- FullTrustAssemblyCollection.cs
- HtmlLink.cs
- ServiceHttpHandlerFactory.cs
- ConfigurationPermission.cs
- RewritingValidator.cs
- RuntimeCompatibilityAttribute.cs
- CfgSemanticTag.cs
- ConfigurationFileMap.cs
- DataGridViewHitTestInfo.cs
- ExtensionWindowResizeGrip.cs
- WinInetCache.cs
- JsonWriter.cs
- HtmlInputPassword.cs
- DataBoundControlHelper.cs
- JsonServiceDocumentSerializer.cs
- ExpressionBuilder.cs
- ProviderUtil.cs
- UserMapPath.cs
- DeflateEmulationStream.cs
- MemberCollection.cs