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
- DrawingCollection.cs
- DataGridCell.cs
- ResourceSet.cs
- SqlClientPermission.cs
- ExplicitDiscriminatorMap.cs
- LinkConverter.cs
- GradientStopCollection.cs
- ConfigXmlElement.cs
- EntityContainerEmitter.cs
- connectionpool.cs
- filewebresponse.cs
- DbMetaDataColumnNames.cs
- ListViewUpdateEventArgs.cs
- OutOfProcStateClientManager.cs
- DomNameTable.cs
- keycontainerpermission.cs
- ToolBarPanel.cs
- ImageButton.cs
- MetadataFile.cs
- OwnerDrawPropertyBag.cs
- StringSorter.cs
- XmlTextReaderImpl.cs
- DeploymentSection.cs
- OutOfProcStateClientManager.cs
- BlobPersonalizationState.cs
- ZipIOExtraFieldZip64Element.cs
- Logging.cs
- RawStylusInputCustomData.cs
- PartialTrustHelpers.cs
- ContractNamespaceAttribute.cs
- FontUnit.cs
- DataSourceCacheDurationConverter.cs
- MsmqTransportSecurity.cs
- InvalidCastException.cs
- BrushConverter.cs
- DrawingAttributesDefaultValueFactory.cs
- UnaryNode.cs
- UTF32Encoding.cs
- DataGridPagerStyle.cs
- InternalEnumValidator.cs
- PersonalizableAttribute.cs
- QilCloneVisitor.cs
- DynamicActionMessageFilter.cs
- WebBrowserContainer.cs
- InvokerUtil.cs
- SessionStateContainer.cs
- Panel.cs
- DataColumnSelectionConverter.cs
- DesignBinding.cs
- ProfileEventArgs.cs
- UncommonField.cs
- DataGridParentRows.cs
- BitmapEffectrendercontext.cs
- Int32Converter.cs
- Line.cs
- VoiceObjectToken.cs
- _FtpDataStream.cs
- PatternMatchRules.cs
- CellTreeNode.cs
- X509ChainPolicy.cs
- RowToFieldTransformer.cs
- InkCanvasAutomationPeer.cs
- BindingList.cs
- TableAdapterManagerHelper.cs
- FastEncoderWindow.cs
- Decimal.cs
- WindowsFormsHostAutomationPeer.cs
- SoapExtensionImporter.cs
- SafeFileHandle.cs
- CompilationSection.cs
- TemplateControlBuildProvider.cs
- SharedPerformanceCounter.cs
- QualificationDataItem.cs
- Misc.cs
- ColumnPropertiesGroup.cs
- SoapProtocolReflector.cs
- TemplateXamlParser.cs
- SBCSCodePageEncoding.cs
- RelatedPropertyManager.cs
- SocketPermission.cs
- DocumentSequenceHighlightLayer.cs
- QilDataSource.cs
- WebPartAddingEventArgs.cs
- SQLDecimal.cs
- CellIdBoolean.cs
- NetNamedPipeSecurity.cs
- ContainerParaClient.cs
- ServicesUtilities.cs
- CharacterHit.cs
- BitSet.cs
- SessionEndedEventArgs.cs
- XmlAggregates.cs
- UserMapPath.cs
- TableChangeProcessor.cs
- DocumentViewerAutomationPeer.cs
- ComplexTypeEmitter.cs
- QilLiteral.cs
- SymbolTable.cs
- TypeDescriptionProvider.cs
- Vector3DCollection.cs