Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DateTimePickerDesigner.cs / 1 / DateTimePickerDesigner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.DateTimePickerDesigner..ctor()")]
namespace System.Windows.Forms.Design {
using System.ComponentModel;
using System.Diagnostics;
using System;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Drawing;
using Microsoft.Win32;
using System.Windows.Forms.Design.Behavior;
using System.Collections;
///
///
///
/// Provides rich design time behavior for the
/// DateTimePicker control.
///
///
internal class DateTimePickerDesigner : ControlDesigner {
public DateTimePickerDesigner() {
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;
//a single text-baseline for the label (and linklabel) control
int baseline = DesignerUtils.GetTextBaseline(Control, System.Drawing.ContentAlignment.MiddleLeft);
// DateTimePicker doesn't have an alignment, so we use MiddleLeft and add a fudge-factor
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
- ParameterReplacerVisitor.cs
- TabControl.cs
- UIServiceHelper.cs
- SecondaryViewProvider.cs
- Screen.cs
- ObjectListFieldsPage.cs
- ImageBrush.cs
- GeometryHitTestParameters.cs
- WebBaseEventKeyComparer.cs
- SwitchLevelAttribute.cs
- CompilerState.cs
- DataObject.cs
- ListBox.cs
- ResourceDictionary.cs
- Enum.cs
- LabelEditEvent.cs
- AutoScrollHelper.cs
- EpmSourcePathSegment.cs
- LayoutTable.cs
- ScriptIgnoreAttribute.cs
- ConfigXmlAttribute.cs
- OleDbParameterCollection.cs
- CssClassPropertyAttribute.cs
- AppSettingsExpressionBuilder.cs
- VersionedStreamOwner.cs
- SerializationInfoEnumerator.cs
- EndpointAddressProcessor.cs
- WorkflowLayouts.cs
- ComponentResourceKey.cs
- CssTextWriter.cs
- XmlSchemaSimpleTypeUnion.cs
- Symbol.cs
- HtmlTableRow.cs
- Label.cs
- _ProxyChain.cs
- GatewayIPAddressInformationCollection.cs
- InvalidProgramException.cs
- ProfileParameter.cs
- CodeBinaryOperatorExpression.cs
- RuntimeConfigLKG.cs
- BinaryObjectReader.cs
- DataColumn.cs
- ClipboardProcessor.cs
- GridViewItemAutomationPeer.cs
- LinqDataSourceDisposeEventArgs.cs
- RelationshipFixer.cs
- MILUtilities.cs
- RSAPKCS1KeyExchangeFormatter.cs
- NegatedCellConstant.cs
- QueryIntervalOp.cs
- WebPartConnectVerb.cs
- TabControl.cs
- VarRemapper.cs
- TransactionManager.cs
- WindowsSlider.cs
- Soap.cs
- ErrorRuntimeConfig.cs
- PolicyDesigner.cs
- XmlHierarchicalEnumerable.cs
- SelectionEditor.cs
- Odbc32.cs
- PackageFilter.cs
- WindowShowOrOpenTracker.cs
- ComplusEndpointConfigContainer.cs
- NavigateEvent.cs
- IpcClientChannel.cs
- Cursors.cs
- PopupEventArgs.cs
- XmlSchemaValidator.cs
- Ops.cs
- Repeater.cs
- SamlAuthorizationDecisionStatement.cs
- OdbcCommandBuilder.cs
- VerifyHashRequest.cs
- CodeTypeReferenceCollection.cs
- RegexBoyerMoore.cs
- BackgroundFormatInfo.cs
- XmlDataSource.cs
- DesignRelationCollection.cs
- AsymmetricSecurityBindingElement.cs
- MarginCollapsingState.cs
- VisemeEventArgs.cs
- AdvancedBindingEditor.cs
- AttachedPropertyBrowsableAttribute.cs
- IpcClientChannel.cs
- ResourceReferenceExpressionConverter.cs
- JsonFormatReaderGenerator.cs
- RuleSettingsCollection.cs
- Vector3DCollection.cs
- RoutedEventConverter.cs
- BrowserTree.cs
- SqlGatherConsumedAliases.cs
- Rotation3DAnimationBase.cs
- DataListGeneralPage.cs
- TextTrailingCharacterEllipsis.cs
- CngUIPolicy.cs
- ThousandthOfEmRealDoubles.cs
- MailDefinition.cs
- PermissionAttributes.cs
- InternalConfigHost.cs