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
- IncomingWebRequestContext.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DefaultParameterValueAttribute.cs
- TableColumnCollection.cs
- TdsParserSafeHandles.cs
- PageVisual.cs
- AbstractSvcMapFileLoader.cs
- SecurityTraceRecordHelper.cs
- SyndicationDeserializer.cs
- Parsers.cs
- mansign.cs
- DrawingState.cs
- DataBoundControlAdapter.cs
- FunctionDescription.cs
- EventMappingSettings.cs
- SpeechSeg.cs
- NativeMethods.cs
- EventLogEntry.cs
- DispatcherExceptionFilterEventArgs.cs
- MemberDescriptor.cs
- SmiMetaData.cs
- AQNBuilder.cs
- ObjectDataSourceFilteringEventArgs.cs
- DemultiplexingClientMessageFormatter.cs
- LabelLiteral.cs
- ToolStripGripRenderEventArgs.cs
- TextEditorDragDrop.cs
- DbConnectionPoolCounters.cs
- Utilities.cs
- CancellationState.cs
- MouseEvent.cs
- CommandBinding.cs
- MetadataCacheItem.cs
- NativeRightsManagementAPIsStructures.cs
- TimeManager.cs
- safemediahandle.cs
- ValidatedControlConverter.cs
- RenderDataDrawingContext.cs
- XmlNamespaceMappingCollection.cs
- ListViewAutomationPeer.cs
- ConnectionPoint.cs
- MemberNameValidator.cs
- Soap.cs
- SemanticAnalyzer.cs
- IndexedWhereQueryOperator.cs
- DeclaredTypeValidatorAttribute.cs
- FirstMatchCodeGroup.cs
- SafeThemeHandle.cs
- ConnectionPool.cs
- CommandEventArgs.cs
- Axis.cs
- FixedLineResult.cs
- Number.cs
- DataGridViewColumnStateChangedEventArgs.cs
- EntityTemplateFactory.cs
- MembershipSection.cs
- __Filters.cs
- SharedUtils.cs
- WebConfigurationHost.cs
- ToolStripDropDownButton.cs
- FocusManager.cs
- DataGridViewCellStyle.cs
- XmlValidatingReaderImpl.cs
- CatalogPartCollection.cs
- RequiredAttributeAttribute.cs
- ListBindingConverter.cs
- MergeFailedEvent.cs
- SqlPersonalizationProvider.cs
- XmlSchemaSequence.cs
- WindowsListView.cs
- EntityCommand.cs
- GatewayDefinition.cs
- DateBoldEvent.cs
- XmlSchemaAnnotated.cs
- ListDictionary.cs
- StringKeyFrameCollection.cs
- UniqueEventHelper.cs
- FormViewUpdateEventArgs.cs
- CheckPair.cs
- HealthMonitoringSectionHelper.cs
- Condition.cs
- XmlILModule.cs
- TypeConverter.cs
- RegexReplacement.cs
- DataServiceHostFactory.cs
- DependencyObject.cs
- ThreadSafeList.cs
- SqlServer2KCompatibilityCheck.cs
- RegisteredExpandoAttribute.cs
- DiscoveryServiceExtension.cs
- DynamicUpdateCommand.cs
- CodePageEncoding.cs
- TextFormatterImp.cs
- DbConvert.cs
- SymmetricAlgorithm.cs
- BinaryConverter.cs
- VScrollBar.cs
- XmlWriterDelegator.cs
- SuppressIldasmAttribute.cs
- PagerStyle.cs