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
- XmlWrappingReader.cs
- DataRelation.cs
- EventData.cs
- SequentialUshortCollection.cs
- ImageMap.cs
- ProtocolsSection.cs
- ISAPIWorkerRequest.cs
- DashStyle.cs
- ToolStripGrip.cs
- ImageClickEventArgs.cs
- XmlEncoding.cs
- DataGridHyperlinkColumn.cs
- EventlogProvider.cs
- ConfigurationManagerHelper.cs
- TerminateWorkflow.cs
- EdmItemCollection.cs
- DebugTraceHelper.cs
- DataError.cs
- ScopelessEnumAttribute.cs
- UnknownWrapper.cs
- WebPartAddingEventArgs.cs
- GetPageNumberCompletedEventArgs.cs
- TextSelectionHelper.cs
- TextPointer.cs
- SafeRightsManagementQueryHandle.cs
- DbBuffer.cs
- ProcessStartInfo.cs
- WindowInteractionStateTracker.cs
- BlockCollection.cs
- Speller.cs
- ActivityCodeDomSerializationManager.cs
- CurrencyWrapper.cs
- PackagePartCollection.cs
- _RequestCacheProtocol.cs
- AutomationElement.cs
- PartialToken.cs
- PriorityChain.cs
- ServicePointManagerElement.cs
- TableLayoutPanelDesigner.cs
- ImageCodecInfoPrivate.cs
- basenumberconverter.cs
- RecognizeCompletedEventArgs.cs
- OleDbConnectionInternal.cs
- ClipboardData.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- XmlIgnoreAttribute.cs
- BindStream.cs
- Aggregates.cs
- CertificateReferenceElement.cs
- DataServiceContext.cs
- ColorConverter.cs
- CodeFieldReferenceExpression.cs
- RegionInfo.cs
- PenContexts.cs
- ListViewItem.cs
- SecurityPolicySection.cs
- XmlDictionaryReader.cs
- UITypeEditor.cs
- NumericPagerField.cs
- SelectionWordBreaker.cs
- WSHttpBindingElement.cs
- SwitchLevelAttribute.cs
- DependencyObjectValidator.cs
- FileNotFoundException.cs
- MetadataCacheItem.cs
- ClientTarget.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Parameter.cs
- ResourceAssociationTypeEnd.cs
- CompositeScriptReferenceEventArgs.cs
- Comparer.cs
- ObjectSecurityT.cs
- KeySplineConverter.cs
- webeventbuffer.cs
- Path.cs
- Timer.cs
- TagPrefixCollection.cs
- QuaternionValueSerializer.cs
- Logging.cs
- DataGridState.cs
- TrackingCondition.cs
- IsolatedStorage.cs
- XmlEncoding.cs
- NamespaceDisplay.xaml.cs
- InputReportEventArgs.cs
- XmlEncoding.cs
- X509CertificateValidator.cs
- TemplateControlParser.cs
- XmlDesigner.cs
- XmlReader.cs
- OperationFormatter.cs
- SecurityResources.cs
- CqlParser.cs
- PageParserFilter.cs
- XamlToRtfWriter.cs
- DocumentsTrace.cs
- ExpressionPrinter.cs
- sqlstateclientmanager.cs
- BCryptNative.cs
- RemoteWebConfigurationHost.cs