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
- SingleKeyFrameCollection.cs
- DbConnectionFactory.cs
- JapaneseCalendar.cs
- ReflectionTypeLoadException.cs
- KeyValuePair.cs
- MultiBinding.cs
- TriggerBase.cs
- SiteMapHierarchicalDataSourceView.cs
- SudsParser.cs
- DomainConstraint.cs
- SQLInt16.cs
- CodeIdentifiers.cs
- DynamicDocumentPaginator.cs
- DataSourceCache.cs
- HtmlInputControl.cs
- TransactionFilter.cs
- EventArgs.cs
- StackBuilderSink.cs
- SqlSupersetValidator.cs
- MsmqInputChannelBase.cs
- ServiceReference.cs
- FormViewDeleteEventArgs.cs
- TextDecoration.cs
- WizardForm.cs
- _HeaderInfoTable.cs
- RichTextBox.cs
- Brushes.cs
- ParserContext.cs
- BitmapMetadataBlob.cs
- FormsAuthenticationCredentials.cs
- AuthorizationRule.cs
- HtmlLink.cs
- GridViewCancelEditEventArgs.cs
- DataGridViewIntLinkedList.cs
- FormatException.cs
- ImageCodecInfoPrivate.cs
- OAVariantLib.cs
- CaseInsensitiveHashCodeProvider.cs
- XmlLoader.cs
- WindowsIdentity.cs
- CommandConverter.cs
- GorillaCodec.cs
- DBSqlParserTable.cs
- AnonymousIdentificationSection.cs
- PseudoWebRequest.cs
- EncryptedPackage.cs
- StructuredTypeInfo.cs
- SpellCheck.cs
- Int32KeyFrameCollection.cs
- OAVariantLib.cs
- XmlSerializerFactory.cs
- CommonXSendMessage.cs
- MasterPage.cs
- ListenerElementsCollection.cs
- DataMemberFieldEditor.cs
- CollectionExtensions.cs
- UnknownBitmapDecoder.cs
- DataGridViewCellPaintingEventArgs.cs
- DataStorage.cs
- ProcessModelSection.cs
- StringBuilder.cs
- PackageRelationshipCollection.cs
- XmlDigitalSignatureProcessor.cs
- HttpProcessUtility.cs
- HttpCookiesSection.cs
- EdmType.cs
- XhtmlTextWriter.cs
- ThumbAutomationPeer.cs
- Int32CAMarshaler.cs
- DesignBindingEditor.cs
- EditorZoneBase.cs
- RequestQueryParser.cs
- BigIntegerStorage.cs
- EncoderExceptionFallback.cs
- DataDocumentXPathNavigator.cs
- AsyncStreamReader.cs
- TagMapCollection.cs
- FigureParagraph.cs
- UnsafeNativeMethodsTablet.cs
- SmtpAuthenticationManager.cs
- HttpInputStream.cs
- WebPartPersonalization.cs
- Exception.cs
- RubberbandSelector.cs
- ContentDefinition.cs
- ReflectionTypeLoadException.cs
- JsonSerializer.cs
- WebPartConnectionCollection.cs
- PenLineCapValidation.cs
- WhitespaceRuleLookup.cs
- ValueUnavailableException.cs
- ProfileEventArgs.cs
- UriParserTemplates.cs
- XmlCompatibilityReader.cs
- MachineKey.cs
- SafeRightsManagementHandle.cs
- AnnotationAuthorChangedEventArgs.cs
- CodeDOMUtility.cs
- XsltInput.cs
- sortedlist.cs