Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / LockedBorderGlyph.cs / 1 / LockedBorderGlyph.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; ////// /// The LockedBorderGlyph draws one side (depending on type) of a SelectionBorder /// in the 'Locked' mode. The constructor will initialize and cache the pen /// and brush objects to avoid uneccessary recreations. /// internal class LockedBorderGlyph : SelectionGlyphBase { ////// /// This constructor extends from the standard SelectionGlyphBase constructor. Note that /// a primarySelection flag is passed in - this will be used when determining the colors /// of the borders. /// internal LockedBorderGlyph(Rectangle controlBounds, SelectionBorderGlyphType type) : base(null) { InitializeGlyph(controlBounds, type); } ////// Helper function that initializes the Glyph based on bounds, type, primary sel, and bordersize. /// private void InitializeGlyph(Rectangle controlBounds, SelectionBorderGlyphType type) { hitTestCursor = Cursors.Default;//always default cursor for locked rules = SelectionRules.None;//never change sel rules for locked //this will return the rect representing the bounds of the glyph bounds = DesignerUtils.GetBoundsForSelectionType(controlBounds, type); hitBounds = bounds; } ////// /// Simple painting logic for locked Glyphs. /// public override void Paint(PaintEventArgs pe) { DesignerUtils.DrawSelectionBorder(pe.Graphics, bounds); } } } // 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
- DecoderFallback.cs
- Win32NamedPipes.cs
- X509Certificate2.cs
- DataServiceException.cs
- SelectionRangeConverter.cs
- StorageComplexTypeMapping.cs
- DataPointer.cs
- JsonStringDataContract.cs
- Request.cs
- ArglessEventHandlerProxy.cs
- AsnEncodedData.cs
- ResourceDictionary.cs
- AuthorizationSection.cs
- FacetDescriptionElement.cs
- PEFileEvidenceFactory.cs
- XslTransform.cs
- Rijndael.cs
- CalendarTable.cs
- EntityException.cs
- SecurityProtocolCorrelationState.cs
- _UriSyntax.cs
- SchemaImporterExtensionElement.cs
- OracleConnectionString.cs
- GraphicsPath.cs
- ListViewUpdateEventArgs.cs
- TCEAdapterGenerator.cs
- ChooseAction.cs
- GlobalizationAssembly.cs
- SizeF.cs
- TableLayoutSettingsTypeConverter.cs
- XmlSchemas.cs
- SaveFileDialog.cs
- ParallelQuery.cs
- PackageDigitalSignatureManager.cs
- parserscommon.cs
- SystemWebCachingSectionGroup.cs
- TraceHwndHost.cs
- DataObject.cs
- RowToFieldTransformer.cs
- Adorner.cs
- XPathQilFactory.cs
- AttributeTableBuilder.cs
- SoapHeaderAttribute.cs
- ShapingWorkspace.cs
- SelectionEditingBehavior.cs
- MatrixCamera.cs
- SubstitutionResponseElement.cs
- CookieHandler.cs
- ImageIndexConverter.cs
- ObjectDataSourceDisposingEventArgs.cs
- WindowHideOrCloseTracker.cs
- HtmlEncodedRawTextWriter.cs
- SoapSchemaMember.cs
- BidPrivateBase.cs
- PagePropertiesChangingEventArgs.cs
- WsatStrings.cs
- HtmlValidationSummaryAdapter.cs
- StateDesigner.LayoutSelectionGlyph.cs
- WindowsFormsHostAutomationPeer.cs
- SimpleHandlerFactory.cs
- Focus.cs
- PageCache.cs
- LexicalChunk.cs
- WasNotInstalledException.cs
- EventProviderWriter.cs
- PersonalizablePropertyEntry.cs
- CompilationRelaxations.cs
- ConnectionPoint.cs
- control.ime.cs
- ConfigurationSectionGroup.cs
- AssemblyEvidenceFactory.cs
- WindowManager.cs
- ControlPaint.cs
- DataObjectEventArgs.cs
- AttachmentCollection.cs
- EventLogPropertySelector.cs
- MULTI_QI.cs
- Events.cs
- Version.cs
- ActivityMarkupSerializer.cs
- ExcCanonicalXml.cs
- ItemsChangedEventArgs.cs
- TreeViewHitTestInfo.cs
- SoapRpcServiceAttribute.cs
- DBCommandBuilder.cs
- RepeaterItemCollection.cs
- ColumnPropertiesGroup.cs
- ConnectionPool.cs
- DisposableCollectionWrapper.cs
- FieldMetadata.cs
- CompiledELinqQueryState.cs
- ReachSerializationUtils.cs
- COM2PropertyPageUITypeConverter.cs
- UpdateCompiler.cs
- ICollection.cs
- SerializerWriterEventHandlers.cs
- SymbolMethod.cs
- OleDbCommandBuilder.cs
- odbcmetadatafactory.cs
- DictionaryEntry.cs