Code:
/ FX-1434 / FX-1434 / 1.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;
///
///
///
/// Provides a designer that can design components
/// that extend UpDownBase.
///
internal class UpDownBaseDesigner : ControlDesigner {
public UpDownBaseDesigner() {
AutoResizeHandles = true;
}
///
///
/// 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
- FixedPageProcessor.cs
- MarkupCompiler.cs
- ProcessHostServerConfig.cs
- CopyNodeSetAction.cs
- OpCodes.cs
- HtmlMeta.cs
- XmlWriterSettings.cs
- PersonalizationAdministration.cs
- ExpressionBindingCollection.cs
- AttachedPropertyBrowsableAttribute.cs
- EmptyEnumerator.cs
- PropertyBuilder.cs
- RowSpanVector.cs
- InputScopeConverter.cs
- WSSecurityPolicy11.cs
- DataGridDesigner.cs
- StylusPointPropertyInfo.cs
- localization.cs
- GradientBrush.cs
- XmlNamespaceManager.cs
- SortedSetDebugView.cs
- SelectionListDesigner.cs
- GeneralTransformGroup.cs
- IntegrationExceptionEventArgs.cs
- RegexBoyerMoore.cs
- ClrProviderManifest.cs
- BitmapEffectInputConnector.cs
- AssemblyAttributes.cs
- ViewPort3D.cs
- KeyPressEvent.cs
- SchemaDeclBase.cs
- ContextMarshalException.cs
- WorkflowValidationFailedException.cs
- HTTPNotFoundHandler.cs
- DragEventArgs.cs
- DataViewSettingCollection.cs
- TextBoxBaseDesigner.cs
- HttpWriter.cs
- messageonlyhwndwrapper.cs
- TemplateControl.cs
- WindowCollection.cs
- TextEditorDragDrop.cs
- RealizationContext.cs
- SendOperation.cs
- RequestCacheEntry.cs
- _LocalDataStoreMgr.cs
- CopyAttributesAction.cs
- GenericWebPart.cs
- HttpCacheVaryByContentEncodings.cs
- FormsAuthenticationUserCollection.cs
- WebPartMovingEventArgs.cs
- TraceSource.cs
- BamlTreeMap.cs
- PointAnimationBase.cs
- InputElement.cs
- ValuePattern.cs
- TransformPatternIdentifiers.cs
- CompModSwitches.cs
- ToolStripItemEventArgs.cs
- UIPropertyMetadata.cs
- DataColumnChangeEvent.cs
- UdpSocket.cs
- BulletedList.cs
- DecoderFallback.cs
- Attributes.cs
- _NegoStream.cs
- SymbolEqualComparer.cs
- WebDescriptionAttribute.cs
- SqlConnectionManager.cs
- SimpleApplicationHost.cs
- arc.cs
- BehaviorEditorPart.cs
- ObjectDataSourceMethodEventArgs.cs
- DynamicValueConverter.cs
- StructuralObject.cs
- keycontainerpermission.cs
- Pair.cs
- __TransparentProxy.cs
- ListViewUpdateEventArgs.cs
- XmlDocumentFragment.cs
- ConsoleTraceListener.cs
- RenderOptions.cs
- Dispatcher.cs
- MsmqHostedTransportConfiguration.cs
- CommentGlyph.cs
- KnowledgeBase.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- StringBuilder.cs
- MainMenu.cs
- DataGridViewComboBoxColumn.cs
- InvalidMessageContractException.cs
- WebPartDeleteVerb.cs
- XmlQueryRuntime.cs
- RecognizerBase.cs
- BitmapFrameEncode.cs
- FontStyleConverter.cs
- AvTraceDetails.cs
- DictionarySectionHandler.cs
- OrderedEnumerableRowCollection.cs
- SafeNativeMethods.cs