Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / UpDownBaseDesigner.cs / 1 / UpDownBaseDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.UpDownBaseDesigner..ctor()")] namespace System.Windows.Forms.Design { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms.Design.Behavior; ////// /// internal class UpDownBaseDesigner : ControlDesigner { public UpDownBaseDesigner() { AutoResizeHandles = true; } ////// Provides a designer that can design components /// that extend UpDownBase. ////// /// Retrieves a set of rules concerning the movement capabilities of a component. /// This should be one or more flags from the SelectionRules class. If no designer /// provides rules for a component, the component will not get any UI services. /// public override SelectionRules SelectionRules { get { SelectionRules rules = base.SelectionRules; rules &= ~(SelectionRules.TopSizeable | SelectionRules.BottomSizeable); return rules; } } ////// /// Adds a baseline SnapLine to the list of SnapLines related to this control. /// public override IList SnapLines { get { ArrayList snapLines = base.SnapLines as ArrayList; int baseline = DesignerUtils.GetTextBaseline(Control, System.Drawing.ContentAlignment.TopLeft); BorderStyle borderStyle = BorderStyle.Fixed3D; PropertyDescriptor prop = TypeDescriptor.GetProperties(Component)["BorderStyle"]; if (prop != null) { borderStyle = (BorderStyle)prop.GetValue(Component); } if (borderStyle == BorderStyle.None) { baseline -= 1; } else { baseline += 2; } snapLines.Add(new SnapLine(SnapLineType.Baseline, baseline, SnapLinePriority.Medium)); return snapLines; } } } } // 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
- ClientData.cs
- IconConverter.cs
- BaseResourcesBuildProvider.cs
- DrawTreeNodeEventArgs.cs
- FormsIdentity.cs
- ProtectedConfiguration.cs
- CodeParameterDeclarationExpression.cs
- webproxy.cs
- StreamInfo.cs
- CharEntityEncoderFallback.cs
- AxHostDesigner.cs
- InterleavedZipPartStream.cs
- ArrayTypeMismatchException.cs
- FrameworkContentElement.cs
- LocatorGroup.cs
- FullTrustAssembly.cs
- HttpPostedFile.cs
- GridViewHeaderRowPresenter.cs
- AddIn.cs
- ExecutionContext.cs
- EndpointDesigner.cs
- UpdateRecord.cs
- NetworkInformationPermission.cs
- GlyphInfoList.cs
- PeerNearMe.cs
- DescendantQuery.cs
- IPHostEntry.cs
- nulltextcontainer.cs
- DataGridViewCellConverter.cs
- SurrogateEncoder.cs
- NativeObjectSecurity.cs
- CookieParameter.cs
- Config.cs
- ManualResetEvent.cs
- BinaryReader.cs
- InfoCardCryptoHelper.cs
- CategoryAttribute.cs
- HtmlInputImage.cs
- ArrayList.cs
- Membership.cs
- HttpServerVarsCollection.cs
- CommandCollectionEditor.cs
- DetailsViewCommandEventArgs.cs
- ContextConfiguration.cs
- PassportPrincipal.cs
- WindowsAuthenticationModule.cs
- TextEffectResolver.cs
- HtmlContainerControl.cs
- ClickablePoint.cs
- NegationPusher.cs
- TextStore.cs
- WebMessageEncodingBindingElement.cs
- MeasureItemEvent.cs
- WebBrowser.cs
- TaskFileService.cs
- StylusDevice.cs
- MemberRestriction.cs
- VerbConverter.cs
- DataServiceStreamProviderWrapper.cs
- SaveFileDialog.cs
- HttpProtocolImporter.cs
- ExtensionCollection.cs
- FormParameter.cs
- MultipartIdentifier.cs
- PagerSettings.cs
- TypeConverterAttribute.cs
- Metadata.cs
- CroppedBitmap.cs
- dbenumerator.cs
- CommonDialog.cs
- HtmlInputText.cs
- Image.cs
- DefaultWorkflowTransactionService.cs
- EntityCodeGenerator.cs
- DataGridViewRowCancelEventArgs.cs
- SelectionListDesigner.cs
- Transform3D.cs
- CompiledQuery.cs
- TemplateInstanceAttribute.cs
- LineVisual.cs
- Converter.cs
- ExtendedPropertyDescriptor.cs
- DataGridViewRowPostPaintEventArgs.cs
- glyphs.cs
- KernelTypeValidation.cs
- DocumentPageHost.cs
- Odbc32.cs
- DataListItemCollection.cs
- HorizontalAlignConverter.cs
- PasswordTextNavigator.cs
- SchemaCollectionPreprocessor.cs
- ToolStripSplitButton.cs
- FrameworkTextComposition.cs
- FindSimilarActivitiesVerb.cs
- DebugTraceHelper.cs
- HttpCachePolicyElement.cs
- Socket.cs
- ExpressionsCollectionEditor.cs
- MinimizableAttributeTypeConverter.cs
- PrtTicket_Editor.cs