Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / LockedHandleGlyph.cs / 1 / LockedHandleGlyph.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; using System.Runtime.InteropServices; ////// /// The LockedHandleGlyph represents the handle for a non-resizeable control in our new seleciton /// model. Note that the pen and brush are created once per instance of this class /// and re-used in our painting logic for perf. reasonse. /// internal class LockedHandleGlyph : SelectionGlyphBase { private bool isPrimary = false; ////// /// LockedHandleGlyph's constructor takes additional parameters: 'type' and 'primary selection'. /// Also, we create/cache our pen & brush here to avoid this action with every paint message. /// internal LockedHandleGlyph(Rectangle controlBounds, bool primarySelection) : base(null) { isPrimary = primarySelection; hitTestCursor = Cursors.Default; rules = SelectionRules.None; bounds = new Rectangle((controlBounds.X + DesignerUtils.LOCKHANDLEOVERLAP) - DesignerUtils.LOCKHANDLEWIDTH, (controlBounds.Y + DesignerUtils.LOCKHANDLEOVERLAP) - DesignerUtils.LOCKHANDLEHEIGHT, DesignerUtils.LOCKHANDLEWIDTH, DesignerUtils.LOCKHANDLEHEIGHT); hitBounds = bounds; } ////// /// Very simple paint logic. /// public override void Paint(PaintEventArgs pe) { DesignerUtils.DrawLockedHandle(pe.Graphics, bounds, isPrimary, this); } } } // 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
- QueryCacheEntry.cs
- ByteStream.cs
- ProviderConnectionPoint.cs
- SrgsElementFactory.cs
- WorkflowInspectionServices.cs
- HtmlForm.cs
- Funcletizer.cs
- CaseCqlBlock.cs
- DocumentGrid.cs
- SweepDirectionValidation.cs
- HostingEnvironment.cs
- CryptoStream.cs
- XmlSerializationWriter.cs
- DataRowExtensions.cs
- DesignerDataTableBase.cs
- DataBindEngine.cs
- UnsafeNativeMethods.cs
- ComponentGuaranteesAttribute.cs
- PointConverter.cs
- complextypematerializer.cs
- FullTextBreakpoint.cs
- ISFTagAndGuidCache.cs
- BezierSegment.cs
- MemberListBinding.cs
- XmlAttributeAttribute.cs
- Triangle.cs
- ItemChangedEventArgs.cs
- Button.cs
- SessionState.cs
- DataGridRelationshipRow.cs
- ViewEvent.cs
- _NetworkingPerfCounters.cs
- XmlWrappingReader.cs
- Parameter.cs
- JournalEntryListConverter.cs
- ReflectEventDescriptor.cs
- precedingquery.cs
- HScrollBar.cs
- StringSorter.cs
- HwndSourceKeyboardInputSite.cs
- LineServices.cs
- SecurityKeyType.cs
- PropertyChangeTracker.cs
- SmiEventSink_Default.cs
- ImageUrlEditor.cs
- DataServiceHost.cs
- MimeTypeAttribute.cs
- TextParentUndoUnit.cs
- ToolStripItemRenderEventArgs.cs
- XPathScanner.cs
- SerializationInfo.cs
- DiscreteKeyFrames.cs
- PreparingEnlistment.cs
- PropertyNames.cs
- SQLGuid.cs
- WebPartConnectionCollection.cs
- LabelAutomationPeer.cs
- __Error.cs
- PerformanceCounterScope.cs
- DoubleMinMaxAggregationOperator.cs
- TextServicesHost.cs
- RichTextBox.cs
- DataGridViewRowsRemovedEventArgs.cs
- FieldAccessException.cs
- ReflectEventDescriptor.cs
- ErrorHandlingAcceptor.cs
- PageAsyncTaskManager.cs
- DateTimeConverter.cs
- InProcStateClientManager.cs
- externdll.cs
- Stackframe.cs
- SectionInput.cs
- XmlSchemaGroupRef.cs
- DataGridViewTextBoxColumn.cs
- ThumbButtonInfo.cs
- CapabilitiesSection.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- StructuredProperty.cs
- DataGridViewRowStateChangedEventArgs.cs
- ProcessModuleCollection.cs
- RequestSecurityTokenResponseCollection.cs
- WindowsListViewScroll.cs
- XamlReaderConstants.cs
- ScrollBar.cs
- regiisutil.cs
- CancellationHandler.cs
- LabelDesigner.cs
- EnumMember.cs
- CompareValidator.cs
- GlobalizationAssembly.cs
- DataSysAttribute.cs
- MatrixKeyFrameCollection.cs
- UpdatableWrapper.cs
- HandoffBehavior.cs
- FrameworkElementFactoryMarkupObject.cs
- XDRSchema.cs
- ClientSponsor.cs
- WorkflowServiceHostFactory.cs
- VScrollBar.cs
- DataView.cs