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
- MetadataItemCollectionFactory.cs
- WebScriptClientGenerator.cs
- GeometryGroup.cs
- FontNamesConverter.cs
- Utils.cs
- VariantWrapper.cs
- DesignerProperties.cs
- PagerSettings.cs
- InstanceKeyCollisionException.cs
- SchemaEntity.cs
- UnsafeCollabNativeMethods.cs
- OleDbConnectionInternal.cs
- DesignerTransaction.cs
- HttpConfigurationContext.cs
- PolyQuadraticBezierSegment.cs
- MarkupExtensionParser.cs
- TextEffect.cs
- COM2ExtendedBrowsingHandler.cs
- UIPermission.cs
- FormsAuthentication.cs
- GridViewUpdatedEventArgs.cs
- ViewBox.cs
- BindableAttribute.cs
- RadioButton.cs
- EntityDataSourceSelectingEventArgs.cs
- SQLInt16.cs
- PassportAuthentication.cs
- ConnectionStringSettingsCollection.cs
- safePerfProviderHandle.cs
- FolderBrowserDialog.cs
- TableFieldsEditor.cs
- OdbcEnvironmentHandle.cs
- CustomCredentialPolicy.cs
- HttpRequest.cs
- ButtonBase.cs
- MaskedTextProvider.cs
- TextServicesManager.cs
- MetadataItemEmitter.cs
- MembershipUser.cs
- TypedDataSourceCodeGenerator.cs
- TransactionInterop.cs
- QilXmlWriter.cs
- Line.cs
- SqlXmlStorage.cs
- FlowDocumentPaginator.cs
- HWStack.cs
- LocationReferenceEnvironment.cs
- SqlDataSourceQuery.cs
- TextProperties.cs
- ListViewDataItem.cs
- WebPartsSection.cs
- ExtensionSimplifierMarkupObject.cs
- ForeignKeyFactory.cs
- DSACryptoServiceProvider.cs
- RepeatBehavior.cs
- CookieParameter.cs
- XomlCompilerResults.cs
- MenuAdapter.cs
- OleDbRowUpdatedEvent.cs
- ToolStripContentPanelDesigner.cs
- CodeObjectCreateExpression.cs
- CompiledRegexRunnerFactory.cs
- SectionRecord.cs
- DesignBindingConverter.cs
- XmlSchemaImport.cs
- AccessViolationException.cs
- BinaryFormatter.cs
- ClientScriptItemCollection.cs
- TextPatternIdentifiers.cs
- RandomNumberGenerator.cs
- ControlBindingsCollection.cs
- SqlClientFactory.cs
- serverconfig.cs
- DispatcherObject.cs
- UserNamePasswordClientCredential.cs
- XPathNodeHelper.cs
- DataControlButton.cs
- Array.cs
- ImageListStreamer.cs
- HScrollProperties.cs
- CipherData.cs
- Drawing.cs
- DriveNotFoundException.cs
- ApplicationException.cs
- StubHelpers.cs
- RoutedEventHandlerInfo.cs
- AuthenticationConfig.cs
- ApplicationInfo.cs
- SqlProfileProvider.cs
- BindingContext.cs
- AsyncDataRequest.cs
- ImageCollectionEditor.cs
- ResourceIDHelper.cs
- BuildResult.cs
- CustomAttributeSerializer.cs
- ObjectDataSourceEventArgs.cs
- VectorKeyFrameCollection.cs
- RectangleF.cs
- CharConverter.cs
- ReachFixedPageSerializerAsync.cs