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
- SingleObjectCollection.cs
- DataBinding.cs
- GeneratedView.cs
- ConfigurationManager.cs
- BamlRecordHelper.cs
- TabControlDesigner.cs
- Aggregates.cs
- SessionSwitchEventArgs.cs
- DataSourceCache.cs
- MessageQueueTransaction.cs
- Pair.cs
- ScriptComponentDescriptor.cs
- BitmapEffectRenderDataResource.cs
- ModuleBuilderData.cs
- ColumnTypeConverter.cs
- Psha1DerivedKeyGeneratorHelper.cs
- LookupNode.cs
- FileDialogCustomPlace.cs
- OrthographicCamera.cs
- UITypeEditor.cs
- InkCollectionBehavior.cs
- TabControl.cs
- PageVisual.cs
- _SpnDictionary.cs
- XMLSyntaxException.cs
- InvokeAction.cs
- ClientProxyGenerator.cs
- Rect.cs
- TextServicesContext.cs
- PostBackOptions.cs
- Line.cs
- AddInAdapter.cs
- IgnoreDataMemberAttribute.cs
- XmlSignatureManifest.cs
- SafeSecurityHandles.cs
- CompressEmulationStream.cs
- Converter.cs
- cookieexception.cs
- PeerNameResolver.cs
- BroadcastEventHelper.cs
- CreateRefExpr.cs
- XPathSelectionIterator.cs
- ModelVisual3D.cs
- ContentIterators.cs
- EntityDataReader.cs
- SmtpNegotiateAuthenticationModule.cs
- HtmlLabelAdapter.cs
- EditorBrowsableAttribute.cs
- PathSegmentCollection.cs
- EndpointAddressMessageFilterTable.cs
- CommonGetThemePartSize.cs
- UnsafeCollabNativeMethods.cs
- ArgumentNullException.cs
- TypeListConverter.cs
- TextSimpleMarkerProperties.cs
- GcSettings.cs
- Margins.cs
- HashJoinQueryOperatorEnumerator.cs
- Expressions.cs
- InputMethodStateChangeEventArgs.cs
- arabicshape.cs
- SqlOuterApplyReducer.cs
- ColumnBinding.cs
- HttpDictionary.cs
- Decorator.cs
- XmlDeclaration.cs
- RelationshipDetailsRow.cs
- SetterBase.cs
- LockedAssemblyCache.cs
- HostingPreferredMapPath.cs
- NativeObjectSecurity.cs
- SizeIndependentAnimationStorage.cs
- ManagementOperationWatcher.cs
- cookie.cs
- EmptyStringExpandableObjectConverter.cs
- DoubleConverter.cs
- DependsOnAttribute.cs
- SchemaMerger.cs
- AssociatedControlConverter.cs
- FamilyMapCollection.cs
- RelativeSource.cs
- TextEffectResolver.cs
- CAGDesigner.cs
- VirtualDirectoryMapping.cs
- TextEditorDragDrop.cs
- InstanceStore.cs
- PeerHelpers.cs
- DataGridCommandEventArgs.cs
- TextSelection.cs
- InfoCardRSACryptoProvider.cs
- Point3DCollectionValueSerializer.cs
- StaticExtension.cs
- QueryCursorEventArgs.cs
- HuffModule.cs
- BindToObject.cs
- BufferedGraphics.cs
- IisTraceListener.cs
- AsyncStreamReader.cs
- HandlerWithFactory.cs
- DataDocumentXPathNavigator.cs