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
- StyleModeStack.cs
- RtfToXamlLexer.cs
- PolicyChain.cs
- DropShadowEffect.cs
- TableParaClient.cs
- Camera.cs
- PasswordRecovery.cs
- SafeCryptContextHandle.cs
- EntityKey.cs
- NetWebProxyFinder.cs
- FixUpCollection.cs
- GridLengthConverter.cs
- HashHelper.cs
- SqlUtil.cs
- StringArrayConverter.cs
- StatusBarPanelClickEvent.cs
- TextBlock.cs
- WebMessageEncodingBindingElement.cs
- AspNetSynchronizationContext.cs
- XmlSchemaGroup.cs
- StorageMappingItemCollection.cs
- GridViewCancelEditEventArgs.cs
- TextPattern.cs
- DataGridViewColumnEventArgs.cs
- RecipientIdentity.cs
- graph.cs
- __Filters.cs
- basecomparevalidator.cs
- FlowLayoutPanel.cs
- WSSecureConversationFeb2005.cs
- IgnoreFileBuildProvider.cs
- MessageContractMemberAttribute.cs
- DataTableMappingCollection.cs
- DataGridViewAdvancedBorderStyle.cs
- securitymgrsite.cs
- OleDbMetaDataFactory.cs
- MethodImplAttribute.cs
- PolyBezierSegmentFigureLogic.cs
- TypeSystem.cs
- _TLSstream.cs
- AddDataControlFieldDialog.cs
- TemplateBindingExtension.cs
- WrapPanel.cs
- ImageField.cs
- GrammarBuilder.cs
- PageRouteHandler.cs
- BaseValidator.cs
- NetSectionGroup.cs
- DurableInstanceProvider.cs
- WizardStepCollectionEditor.cs
- InputLanguageManager.cs
- PointAnimationClockResource.cs
- ProviderConnectionPointCollection.cs
- GeometryModel3D.cs
- ValidationError.cs
- DeploymentExceptionMapper.cs
- ListControlBuilder.cs
- SessionSwitchEventArgs.cs
- GetPageCompletedEventArgs.cs
- AnnotationService.cs
- SettingsPropertyValueCollection.cs
- NativeStructs.cs
- TextBreakpoint.cs
- GeometryHitTestParameters.cs
- SrgsElementList.cs
- HttpCapabilitiesEvaluator.cs
- BindToObject.cs
- TextTreePropertyUndoUnit.cs
- AxImporter.cs
- ModuleElement.cs
- SelectedDatesCollection.cs
- MsmqChannelListenerBase.cs
- Enum.cs
- StrongNamePublicKeyBlob.cs
- RequestChannelBinder.cs
- GlyphInfoList.cs
- GenerateTemporaryTargetAssembly.cs
- CopyOnWriteList.cs
- WpfPayload.cs
- HighlightVisual.cs
- XmlSchemaDatatype.cs
- FullTextLine.cs
- ExtractedStateEntry.cs
- RotateTransform3D.cs
- CacheSection.cs
- EventMetadata.cs
- PartialCachingAttribute.cs
- Int32Animation.cs
- EntityContainerAssociationSet.cs
- JsonObjectDataContract.cs
- DocumentationServerProtocol.cs
- UnmanagedMemoryStream.cs
- XpsS0ValidatingLoader.cs
- LayoutSettings.cs
- WebPartManagerInternals.cs
- TableItemStyle.cs
- HtmlTableRowCollection.cs
- IncrementalCompileAnalyzer.cs
- DynamicDataManager.cs
- SelfSignedCertificate.cs