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
- PhysicalOps.cs
- TargetException.cs
- DataColumn.cs
- InvalidCommandTreeException.cs
- StandardTransformFactory.cs
- NotCondition.cs
- DynamicResourceExtension.cs
- SymmetricAlgorithm.cs
- GridLengthConverter.cs
- EventMappingSettings.cs
- XsdDateTime.cs
- CSharpCodeProvider.cs
- AllowedAudienceUriElementCollection.cs
- CompilerCollection.cs
- MailMessage.cs
- ToolStripTemplateNode.cs
- MethodBody.cs
- SemanticResultKey.cs
- TrustManagerMoreInformation.cs
- MDIControlStrip.cs
- CallbackCorrelationInitializer.cs
- EntityUtil.cs
- SqlColumnizer.cs
- ContractTypeNameElement.cs
- UnsafeNativeMethods.cs
- DataGridViewAccessibleObject.cs
- Tokenizer.cs
- Rect3DValueSerializer.cs
- SHA256Managed.cs
- EntityDesignerUtils.cs
- Error.cs
- TransformerInfo.cs
- DtdParser.cs
- ExceptionHandlers.cs
- CursorInteropHelper.cs
- EncryptedPackageFilter.cs
- DataGridPagerStyle.cs
- FixedSOMTable.cs
- StateBag.cs
- EventLogHandle.cs
- DrawListViewColumnHeaderEventArgs.cs
- KeyBinding.cs
- TypeBuilderInstantiation.cs
- TagElement.cs
- ImageConverter.cs
- XamlToRtfWriter.cs
- ExtentKey.cs
- AuthenticationModuleElementCollection.cs
- SqlBulkCopy.cs
- DesignerOptionService.cs
- WebDisplayNameAttribute.cs
- RightsController.cs
- GetBrowserTokenRequest.cs
- XmlSchemaAppInfo.cs
- XNodeValidator.cs
- CacheDependency.cs
- EditorPartCollection.cs
- TextSchema.cs
- WhitespaceRuleReader.cs
- WhitespaceRuleReader.cs
- ServicePointManager.cs
- SQLResource.cs
- InputScopeAttribute.cs
- WmiEventSink.cs
- AxImporter.cs
- GridItemProviderWrapper.cs
- DataGridViewButtonCell.cs
- ControlCommandSet.cs
- LambdaCompiler.ControlFlow.cs
- Rules.cs
- JsonStringDataContract.cs
- ParseChildrenAsPropertiesAttribute.cs
- DateTimeOffsetAdapter.cs
- DataListCommandEventArgs.cs
- RootBrowserWindowProxy.cs
- NativeMethods.cs
- ActionItem.cs
- PeerContact.cs
- odbcmetadatafactory.cs
- CompiledQuery.cs
- RelationalExpressions.cs
- TableLayoutStyleCollection.cs
- JsonWriter.cs
- GridViewRowCollection.cs
- FlowDocumentPage.cs
- Viewport2DVisual3D.cs
- SoapSchemaMember.cs
- FixedSOMPageConstructor.cs
- ExpressionNormalizer.cs
- ByteRangeDownloader.cs
- GenerateHelper.cs
- BamlRecordWriter.cs
- WebCategoryAttribute.cs
- CategoryValueConverter.cs
- dataobject.cs
- ConfigXmlComment.cs
- DataTemplateSelector.cs
- TreeWalkHelper.cs
- PerformanceCounterPermissionEntryCollection.cs
- DataDesignUtil.cs