Code:
/ DotNET / DotNET / 8.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
- RawStylusSystemGestureInputReport.cs
- PagesChangedEventArgs.cs
- WindowsIdentity.cs
- StandardBindingElement.cs
- ComponentTray.cs
- EntityClassGenerator.cs
- XmlEncoding.cs
- _ListenerAsyncResult.cs
- DetailsViewActionList.cs
- NestedContainer.cs
- TrackingRecord.cs
- FreezableCollection.cs
- SkinIDTypeConverter.cs
- __TransparentProxy.cs
- odbcmetadatacolumnnames.cs
- WebReferencesBuildProvider.cs
- WinEventQueueItem.cs
- CodeIterationStatement.cs
- externdll.cs
- Section.cs
- OleDbParameter.cs
- RouteParametersHelper.cs
- ConstructorBuilder.cs
- RuntimeWrappedException.cs
- Scheduling.cs
- PathParser.cs
- ByteStack.cs
- RuleInfoComparer.cs
- MultiTrigger.cs
- PathGradientBrush.cs
- MobileSysDescriptionAttribute.cs
- PolicyStatement.cs
- DiscoveryClientElement.cs
- ControlIdConverter.cs
- SrgsText.cs
- XmlLanguageConverter.cs
- HttpClientCertificate.cs
- CodePageUtils.cs
- DataListDesigner.cs
- XmlArrayItemAttribute.cs
- StandardRuntimeEnumValidator.cs
- MediaPlayerState.cs
- HttpHandlerActionCollection.cs
- ProfileSettingsCollection.cs
- DesignUtil.cs
- TemplateBindingExtensionConverter.cs
- Menu.cs
- XPathBuilder.cs
- CFStream.cs
- CodeCatchClauseCollection.cs
- ImageKeyConverter.cs
- MsmqAppDomainProtocolHandler.cs
- NextPreviousPagerField.cs
- DataExpression.cs
- AttachedAnnotation.cs
- SmiEventSink.cs
- ExpressionEditorSheet.cs
- RtfToken.cs
- GCHandleCookieTable.cs
- EnumBuilder.cs
- PerformanceCounter.cs
- RuleSettingsCollection.cs
- SelectorItemAutomationPeer.cs
- BindingElementExtensionElement.cs
- StreamGeometryContext.cs
- PerfCounters.cs
- DataGridDesigner.cs
- StringPropertyBuilder.cs
- Compress.cs
- ReadWriteObjectLock.cs
- RangeValidator.cs
- DataSourceHelper.cs
- WindowsGraphics2.cs
- WebPartCloseVerb.cs
- WeakRefEnumerator.cs
- Knowncolors.cs
- DataRelationCollection.cs
- SqlInternalConnectionTds.cs
- BaseCodeDomTreeGenerator.cs
- DesignOnlyAttribute.cs
- BuildProvider.cs
- MatchAttribute.cs
- ToolStripSystemRenderer.cs
- XmlSerializationGeneratedCode.cs
- DataContractAttribute.cs
- TraceFilter.cs
- PageBreakRecord.cs
- SolidBrush.cs
- oledbmetadatacolumnnames.cs
- TextBox.cs
- RemotingException.cs
- DatatypeImplementation.cs
- LinqDataSourceContextEventArgs.cs
- TCEAdapterGenerator.cs
- ProgressBarBrushConverter.cs
- IisNotInstalledException.cs
- XmlQualifiedName.cs
- COM2TypeInfoProcessor.cs
- ByteRangeDownloader.cs
- QuotedPrintableStream.cs