Code:
/ FX-1434 / FX-1434 / 1.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
- ParameterElementCollection.cs
- URLString.cs
- StrongNameMembershipCondition.cs
- TextEncodedRawTextWriter.cs
- PersonalizableAttribute.cs
- Knowncolors.cs
- UidManager.cs
- TypeConvertions.cs
- ParserStack.cs
- HitTestParameters.cs
- ReferentialConstraint.cs
- DeferredSelectedIndexReference.cs
- Literal.cs
- ToolBarOverflowPanel.cs
- XamlDesignerSerializationManager.cs
- PackageRelationshipCollection.cs
- BuilderInfo.cs
- TimeSpan.cs
- DataPager.cs
- FormCollection.cs
- ForeignKeyConstraint.cs
- IncrementalHitTester.cs
- CategoryNameCollection.cs
- InternalDuplexChannelFactory.cs
- AsyncResult.cs
- PropertyItem.cs
- DnsPermission.cs
- X509Certificate2Collection.cs
- ObjectConverter.cs
- CachedFontFamily.cs
- RenderingBiasValidation.cs
- CompoundFileIOPermission.cs
- VirtualDirectoryMappingCollection.cs
- CancellationState.cs
- BitVector32.cs
- RegisteredHiddenField.cs
- AssemblyAttributes.cs
- GridPatternIdentifiers.cs
- CatalogPart.cs
- SearchForVirtualItemEventArgs.cs
- CodeGeneratorOptions.cs
- ClientRuntimeConfig.cs
- AsyncContentLoadedEventArgs.cs
- FrameworkElementAutomationPeer.cs
- ConfigUtil.cs
- LogAppendAsyncResult.cs
- HostingEnvironmentWrapper.cs
- SamlAudienceRestrictionCondition.cs
- LoginAutoFormat.cs
- ExcludePathInfo.cs
- _FtpDataStream.cs
- shaperfactoryquerycachekey.cs
- SQLDoubleStorage.cs
- DetailsViewCommandEventArgs.cs
- RangeValuePattern.cs
- ReaderWriterLock.cs
- GlobalizationSection.cs
- XomlDesignerLoader.cs
- DependencyPropertyValueSerializer.cs
- SafeNativeMethods.cs
- Cursor.cs
- CommandBindingCollection.cs
- MSG.cs
- XmlSchemaAttributeGroup.cs
- SafeRightsManagementSessionHandle.cs
- Misc.cs
- ModelUtilities.cs
- Lease.cs
- MaskDescriptors.cs
- PathFigure.cs
- TextTreeInsertElementUndoUnit.cs
- _NetworkingPerfCounters.cs
- MailAddress.cs
- NativeMethods.cs
- EnumerableRowCollectionExtensions.cs
- IntersectQueryOperator.cs
- DateBoldEvent.cs
- sitestring.cs
- MessagePartSpecification.cs
- Dispatcher.cs
- MimeObjectFactory.cs
- CodeChecksumPragma.cs
- SimpleMailWebEventProvider.cs
- QilGeneratorEnv.cs
- PasswordRecovery.cs
- IApplicationTrustManager.cs
- LocalizationParserHooks.cs
- DataViewSettingCollection.cs
- TreeNode.cs
- WindowShowOrOpenTracker.cs
- XpsImageSerializationService.cs
- DataGridColumnEventArgs.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- KeyBinding.cs
- RenderData.cs
- RawStylusInputCustomDataList.cs
- QilIterator.cs
- AutomationPropertyInfo.cs
- ItemCheckEvent.cs
- EndOfStreamException.cs