Code:
/ DotNET / DotNET / 8.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
- TraceSwitch.cs
- ArrayTypeMismatchException.cs
- RecordConverter.cs
- EasingFunctionBase.cs
- AsymmetricAlgorithm.cs
- RequestCache.cs
- errorpatternmatcher.cs
- XamlToRtfParser.cs
- MimeMultiPart.cs
- GridViewCancelEditEventArgs.cs
- GCHandleCookieTable.cs
- ServiceMemoryGates.cs
- SimpleBitVector32.cs
- BeginGetFileNameFromUserRequest.cs
- SendKeys.cs
- ComboBox.cs
- PersonalizationProviderHelper.cs
- FtpRequestCacheValidator.cs
- DefaultAuthorizationContext.cs
- AuthenticatedStream.cs
- DataControlFieldCollection.cs
- DataRelation.cs
- XmlSerializerVersionAttribute.cs
- coordinatorfactory.cs
- DataObject.cs
- UIPermission.cs
- DragDeltaEventArgs.cs
- WindowsSecurityTokenAuthenticator.cs
- autovalidator.cs
- ExceptionUtil.cs
- MethodCallTranslator.cs
- Point.cs
- SecuritySessionFilter.cs
- TransportSecurityHelpers.cs
- Camera.cs
- safemediahandle.cs
- Button.cs
- QueryContinueDragEventArgs.cs
- SelectManyQueryOperator.cs
- HelpProvider.cs
- X509DefaultServiceCertificateElement.cs
- EmptyEnumerator.cs
- RegexGroup.cs
- OpenFileDialog.cs
- MsdtcClusterUtils.cs
- AsymmetricKeyExchangeDeformatter.cs
- CodeDirectoryCompiler.cs
- ClassGenerator.cs
- AvTraceDetails.cs
- OdbcDataReader.cs
- ParameterToken.cs
- QuaternionConverter.cs
- XmlDigitalSignatureProcessor.cs
- PermissionSetTriple.cs
- TiffBitmapDecoder.cs
- BoolExpr.cs
- MachineKeySection.cs
- BooleanExpr.cs
- BitmapEffectGeneralTransform.cs
- Transactions.cs
- ToolStripDropDownButton.cs
- EventSourceCreationData.cs
- TableCellAutomationPeer.cs
- ECDiffieHellmanCng.cs
- LockCookie.cs
- TriggerCollection.cs
- XsltInput.cs
- AssemblyResolver.cs
- ShaperBuffers.cs
- ProvidePropertyAttribute.cs
- CheckBox.cs
- LineInfo.cs
- StorageScalarPropertyMapping.cs
- KnownAssembliesSet.cs
- FunctionUpdateCommand.cs
- Pair.cs
- Model3D.cs
- DataTemplate.cs
- HostedBindingBehavior.cs
- InfoCardAsymmetricCrypto.cs
- InstanceNotFoundException.cs
- DrawListViewSubItemEventArgs.cs
- FreezableDefaultValueFactory.cs
- CollectionBuilder.cs
- DefaultTraceListener.cs
- MulticastDelegate.cs
- UInt16.cs
- OleDbWrapper.cs
- AdRotatorDesigner.cs
- BitmapInitialize.cs
- StringStorage.cs
- ArrayMergeHelper.cs
- SqlFormatter.cs
- SharedPersonalizationStateInfo.cs
- CheckedPointers.cs
- ConfigXmlDocument.cs
- InternalCache.cs
- FindProgressChangedEventArgs.cs
- DataGridViewMethods.cs
- DynamicDiscoSearcher.cs