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
- PathStreamGeometryContext.cs
- QueueProcessor.cs
- IRCollection.cs
- TypeInfo.cs
- InlineUIContainer.cs
- Scalars.cs
- TextProviderWrapper.cs
- CommandID.cs
- WebServiceData.cs
- CodeCatchClauseCollection.cs
- UshortList2.cs
- EntityDataSourceMemberPath.cs
- QilList.cs
- FileAuthorizationModule.cs
- ContentHostHelper.cs
- StyleSelector.cs
- CompletedAsyncResult.cs
- WindowInteractionStateTracker.cs
- AudioDeviceOut.cs
- CngKey.cs
- NotifyInputEventArgs.cs
- SiteIdentityPermission.cs
- StorageBasedPackageProperties.cs
- Transform3DGroup.cs
- Exception.cs
- PasswordRecovery.cs
- FacetValueContainer.cs
- DesignerImageAdapter.cs
- MachinePropertyVariants.cs
- NativeMethods.cs
- CalculatedColumn.cs
- HtmlTableCellCollection.cs
- WpfXamlType.cs
- MarkedHighlightComponent.cs
- ShapeTypeface.cs
- DesignerLoader.cs
- RSAPKCS1SignatureDeformatter.cs
- Attributes.cs
- X509SecurityTokenAuthenticator.cs
- PersistencePipeline.cs
- XmlILOptimizerVisitor.cs
- CodeNamespace.cs
- PeerSecurityHelpers.cs
- StrongNamePublicKeyBlob.cs
- ProtocolsConfigurationHandler.cs
- ScrollPattern.cs
- GlyphTypeface.cs
- KeyFrames.cs
- EFAssociationProvider.cs
- ThrowHelper.cs
- BreakSafeBase.cs
- InplaceBitmapMetadataWriter.cs
- ContractSearchPattern.cs
- DrawingImage.cs
- ProjectedSlot.cs
- SocketException.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- SpnEndpointIdentity.cs
- WCFBuildProvider.cs
- SiteMapNodeCollection.cs
- QueryMatcher.cs
- EntityContainerRelationshipSet.cs
- DependencyPropertyKind.cs
- CompiledXpathExpr.cs
- CaseDesigner.xaml.cs
- RotateTransform.cs
- Set.cs
- XmlSerializerAssemblyAttribute.cs
- DefaultObjectMappingItemCollection.cs
- TextControlDesigner.cs
- ApplicationSettingsBase.cs
- Debugger.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- EndPoint.cs
- TabletDevice.cs
- CodeMethodInvokeExpression.cs
- unsafenativemethodsother.cs
- ReachFixedPageSerializerAsync.cs
- DynamicVirtualDiscoSearcher.cs
- JoinCqlBlock.cs
- WebPartManagerInternals.cs
- TableLayoutRowStyleCollection.cs
- EventlogProvider.cs
- SelectionProcessor.cs
- SmiXetterAccessMap.cs
- LogRecordSequence.cs
- RepeaterItemCollection.cs
- GregorianCalendar.cs
- IDispatchConstantAttribute.cs
- CqlLexerHelpers.cs
- PeerNearMe.cs
- ParentQuery.cs
- _ConnectOverlappedAsyncResult.cs
- QuaternionValueSerializer.cs
- SharedConnectionListener.cs
- XmlTypeMapping.cs
- ArrayElementGridEntry.cs
- StorageSetMapping.cs
- Point4D.cs
- configsystem.cs