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
- HGlobalSafeHandle.cs
- DependencyObject.cs
- DiscoveryViaBehavior.cs
- CompilerTypeWithParams.cs
- DataControlFieldTypeEditor.cs
- ToolStripScrollButton.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SetMemberBinder.cs
- ServiceControllerDesigner.cs
- ScriptIgnoreAttribute.cs
- SchemaManager.cs
- PhonemeEventArgs.cs
- ColorKeyFrameCollection.cs
- SecurityRuntime.cs
- SqlInternalConnection.cs
- ObjectQuery_EntitySqlExtensions.cs
- ElementNotEnabledException.cs
- ValidationErrorCollection.cs
- MainMenu.cs
- WebServicesDescriptionAttribute.cs
- IItemProperties.cs
- PathGradientBrush.cs
- SafeProcessHandle.cs
- AssociationSetEnd.cs
- AxParameterData.cs
- listitem.cs
- AsymmetricKeyExchangeFormatter.cs
- _LoggingObject.cs
- AsymmetricAlgorithm.cs
- DeviceFiltersSection.cs
- GetPageNumberCompletedEventArgs.cs
- PerformanceCounterPermissionAttribute.cs
- OutputWindow.cs
- SchemaElementLookUpTable.cs
- AuthenticationManager.cs
- TypeBrowserDialog.cs
- SqlSelectClauseBuilder.cs
- PropertyReferenceSerializer.cs
- FullTextBreakpoint.cs
- TreeNodeClickEventArgs.cs
- WorkflowPersistenceService.cs
- ProgressBar.cs
- UnsafeNativeMethods.cs
- Literal.cs
- AncestorChangedEventArgs.cs
- LinqDataSourceEditData.cs
- Wizard.cs
- StrokeDescriptor.cs
- ColorComboBox.cs
- TimeSpanOrInfiniteConverter.cs
- LocalBuilder.cs
- CharacterBufferReference.cs
- StaticFileHandler.cs
- MobileResource.cs
- OrderByBuilder.cs
- TogglePattern.cs
- Socket.cs
- ObjectStateFormatter.cs
- WebPartAuthorizationEventArgs.cs
- MaskPropertyEditor.cs
- OleDbException.cs
- SimpleMailWebEventProvider.cs
- DeploymentSectionCache.cs
- ImageListStreamer.cs
- WebHeaderCollection.cs
- oledbconnectionstring.cs
- ProgressBarHighlightConverter.cs
- NonBatchDirectoryCompiler.cs
- BitmapPalettes.cs
- XmlArrayItemAttribute.cs
- TextCharacters.cs
- MultipartContentParser.cs
- RtfToken.cs
- RoleManagerEventArgs.cs
- ExpandedWrapper.cs
- Vector3DCollectionValueSerializer.cs
- SoapMessage.cs
- CheckBoxStandardAdapter.cs
- ParameterElement.cs
- EmptyStringExpandableObjectConverter.cs
- WebPartCatalogCloseVerb.cs
- UnsupportedPolicyOptionsException.cs
- PathNode.cs
- Vector3DAnimationUsingKeyFrames.cs
- LocalizeDesigner.cs
- HttpProfileGroupBase.cs
- Tracking.cs
- DynamicDataExtensions.cs
- ChannelManagerService.cs
- UriSchemeKeyedCollection.cs
- OleDbConnectionFactory.cs
- StringFreezingAttribute.cs
- OledbConnectionStringbuilder.cs
- RequestNavigateEventArgs.cs
- SerializerProvider.cs
- ApplicationDirectoryMembershipCondition.cs
- TreeNodeCollectionEditorDialog.cs
- SqlDataSourceCommandEventArgs.cs
- StringValueConverter.cs
- PrintPageEvent.cs