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
- TriggerBase.cs
- _OverlappedAsyncResult.cs
- ConstructorArgumentAttribute.cs
- DataTemplateKey.cs
- StreamGeometry.cs
- selecteditemcollection.cs
- ChameleonKey.cs
- KeyValuePair.cs
- VisualBrush.cs
- DefaultValueAttribute.cs
- ConfigurationElementCollection.cs
- CompModSwitches.cs
- ThumbButtonInfoCollection.cs
- DataGridViewElement.cs
- ObjectConverter.cs
- StylusCaptureWithinProperty.cs
- ContextStack.cs
- TrustLevel.cs
- SafeEventLogReadHandle.cs
- PerformanceCounterTraceRecord.cs
- ServiceDocument.cs
- HwndHost.cs
- StaticSiteMapProvider.cs
- ToolTipService.cs
- AttributeAction.cs
- SerializationStore.cs
- Crc32.cs
- MSAAWinEventWrap.cs
- ExtensibleSyndicationObject.cs
- DependencyPropertyHelper.cs
- GatewayDefinition.cs
- SiteOfOriginContainer.cs
- QilCloneVisitor.cs
- LabelEditEvent.cs
- X500Name.cs
- BStrWrapper.cs
- CallbackValidatorAttribute.cs
- ExpressionBindings.cs
- GlyphElement.cs
- TableStyle.cs
- XPathNavigatorReader.cs
- CmsUtils.cs
- PropertyIDSet.cs
- PlainXmlSerializer.cs
- DeploymentSection.cs
- HasCopySemanticsAttribute.cs
- TextParagraphView.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- WorkflowRuntimeElement.cs
- BoolExpressionVisitors.cs
- StdRegProviderWrapper.cs
- InputReportEventArgs.cs
- KerberosRequestorSecurityToken.cs
- LinqExpressionNormalizer.cs
- ContainerUtilities.cs
- BatchStream.cs
- DoubleLinkListEnumerator.cs
- SQLMoneyStorage.cs
- GridEntryCollection.cs
- WorkflowHostingResponseContext.cs
- errorpatternmatcher.cs
- SimpleBitVector32.cs
- InvokeProviderWrapper.cs
- EntityContainer.cs
- UnsafeNativeMethodsCLR.cs
- InputBuffer.cs
- DecoderReplacementFallback.cs
- InternalPolicyElement.cs
- PolicyStatement.cs
- DBBindings.cs
- Int32Storage.cs
- SimpleTextLine.cs
- DesignerAttribute.cs
- WizardPanel.cs
- CodeArgumentReferenceExpression.cs
- ExpressionNode.cs
- Rectangle.cs
- TransformerConfigurationWizardBase.cs
- VariableExpressionConverter.cs
- BinaryFormatterWriter.cs
- EdmConstants.cs
- AnnotationComponentManager.cs
- BaseCAMarshaler.cs
- SqlVersion.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- ToolStripPanelRenderEventArgs.cs
- XmlSchemaInclude.cs
- FormViewModeEventArgs.cs
- LocalizationCodeDomSerializer.cs
- ArrayTypeMismatchException.cs
- DocumentViewerAutomationPeer.cs
- EventSinkActivityDesigner.cs
- ListSourceHelper.cs
- ObjectDataSourceDesigner.cs
- ClientConvert.cs
- DiscoveryService.cs
- ClientTargetSection.cs
- KnownTypeHelper.cs
- EndOfStreamException.cs