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
- DiagnosticsConfiguration.cs
- CapabilitiesAssignment.cs
- DataControlCommands.cs
- xamlnodes.cs
- FacetValueContainer.cs
- SessionPageStateSection.cs
- AssemblyFilter.cs
- PaintValueEventArgs.cs
- FieldValue.cs
- Win32Native.cs
- Calendar.cs
- SqlWriter.cs
- RelationshipDetailsCollection.cs
- CodeAttributeDeclarationCollection.cs
- BufferAllocator.cs
- ContextTokenTypeConverter.cs
- RemoteWebConfigurationHost.cs
- LogicalExpr.cs
- ECDiffieHellmanPublicKey.cs
- COM2EnumConverter.cs
- FileDialogCustomPlace.cs
- ExpandedWrapper.cs
- ElapsedEventArgs.cs
- SQLRoleProvider.cs
- SemanticBasicElement.cs
- DataGridCaption.cs
- AttachedAnnotation.cs
- WebReferencesBuildProvider.cs
- SmtpCommands.cs
- GregorianCalendarHelper.cs
- ToolStripItemCollection.cs
- ProfileGroupSettingsCollection.cs
- ContactManager.cs
- ObjectConverter.cs
- ListViewItemSelectionChangedEvent.cs
- WindowsAltTab.cs
- CallbackValidator.cs
- xdrvalidator.cs
- Normalization.cs
- BufferAllocator.cs
- Highlights.cs
- CodeParameterDeclarationExpression.cs
- CatalogPartCollection.cs
- EncoderParameter.cs
- RouteParameter.cs
- HttpRequestWrapper.cs
- DataFormats.cs
- BuildDependencySet.cs
- MessageQueueKey.cs
- SymDocumentType.cs
- ReturnType.cs
- documentsequencetextview.cs
- Converter.cs
- ObjectStateManagerMetadata.cs
- SecurityElement.cs
- NotifyIcon.cs
- PropertyOverridesTypeEditor.cs
- TypeUsageBuilder.cs
- Size.cs
- EntityDataSourceViewSchema.cs
- ContractMapping.cs
- GridViewCancelEditEventArgs.cs
- ToolStripSplitStackLayout.cs
- SubtreeProcessor.cs
- ColorBlend.cs
- AstTree.cs
- SQLDateTimeStorage.cs
- TabControlEvent.cs
- ImageListStreamer.cs
- Point.cs
- SapiAttributeParser.cs
- UnmanagedMemoryStreamWrapper.cs
- CodeDirectionExpression.cs
- UpdateManifestForBrowserApplication.cs
- ComponentEvent.cs
- DrawingContextWalker.cs
- SignedXml.cs
- StrokeFIndices.cs
- TdsParserStateObject.cs
- SingleAnimation.cs
- ByteArrayHelperWithString.cs
- WebPartMovingEventArgs.cs
- TableParaClient.cs
- AmbientValueAttribute.cs
- SingleTagSectionHandler.cs
- DataGridViewComboBoxEditingControl.cs
- WorkflowLayouts.cs
- MemoryStream.cs
- InOutArgumentConverter.cs
- BaseDataBoundControl.cs
- StylusPointCollection.cs
- AdapterDictionary.cs
- XmlSchemaExternal.cs
- BypassElementCollection.cs
- ViewRendering.cs
- Compiler.cs
- _Semaphore.cs
- CategoryValueConverter.cs
- TagPrefixAttribute.cs
- HostnameComparisonMode.cs