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
- SqlDataSourceFilteringEventArgs.cs
- MonitoringDescriptionAttribute.cs
- ITextView.cs
- ActivityWithResult.cs
- ConfigXmlSignificantWhitespace.cs
- RangeValuePattern.cs
- RowsCopiedEventArgs.cs
- DataControlButton.cs
- ConfigPathUtility.cs
- ApplicationProxyInternal.cs
- CustomTrackingRecord.cs
- WebBrowserUriTypeConverter.cs
- XPathNodeInfoAtom.cs
- FamilyMap.cs
- TypeLoadException.cs
- TextDecorationCollectionConverter.cs
- XmlChoiceIdentifierAttribute.cs
- MemberInfoSerializationHolder.cs
- ColumnBinding.cs
- MenuRendererStandards.cs
- InputProcessorProfilesLoader.cs
- WorkflowIdleElement.cs
- Brush.cs
- AuthorizationRuleCollection.cs
- SQLUtility.cs
- EventPropertyMap.cs
- EventNotify.cs
- EntityContainerEmitter.cs
- BooleanExpr.cs
- TitleStyle.cs
- OracleColumn.cs
- CodeBinaryOperatorExpression.cs
- ExcCanonicalXml.cs
- KeyValuePairs.cs
- TextEditorDragDrop.cs
- LinqDataSourceContextEventArgs.cs
- BuildResult.cs
- FileLogRecordEnumerator.cs
- WorkflowRuntimeElement.cs
- ValuePatternIdentifiers.cs
- SQLUtility.cs
- ListViewItem.cs
- BindingGroup.cs
- MessagePartProtectionMode.cs
- PartBasedPackageProperties.cs
- HttpGetClientProtocol.cs
- ListViewGroupConverter.cs
- PreservationFileReader.cs
- SiteMembershipCondition.cs
- ViewStateException.cs
- TypeLoadException.cs
- DataGridViewImageColumn.cs
- KeyPressEvent.cs
- PublishLicense.cs
- XPathSelectionIterator.cs
- SHA1Managed.cs
- SegmentInfo.cs
- BinaryFormatter.cs
- VerbConverter.cs
- FontConverter.cs
- CodePropertyReferenceExpression.cs
- StateMachine.cs
- TypeToken.cs
- ZoneMembershipCondition.cs
- EventLogException.cs
- ExpressionEvaluator.cs
- SimpleLine.cs
- ResourceDictionary.cs
- StateMachineWorkflow.cs
- PageContent.cs
- Timeline.cs
- StringFormat.cs
- GenericEnumerator.cs
- ContentElement.cs
- ClientTargetSection.cs
- EndEvent.cs
- RealizationDrawingContextWalker.cs
- InternalMappingException.cs
- AttachedAnnotationChangedEventArgs.cs
- Point4D.cs
- TreeBuilderXamlTranslator.cs
- TextBoxLine.cs
- SQLInt64Storage.cs
- SiteMapNode.cs
- Identity.cs
- FormsAuthenticationModule.cs
- CultureMapper.cs
- ErrorEventArgs.cs
- DataGridHeaderBorder.cs
- ListViewItem.cs
- ExpressionDumper.cs
- XmlSchemaAttributeGroup.cs
- HttpRawResponse.cs
- XmlResolver.cs
- DocumentScope.cs
- ExpandedProjectionNode.cs
- Utility.cs
- ReadOnlyTernaryTree.cs
- CodeNamespaceImportCollection.cs
- hebrewshape.cs