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; ////// /// internal class DateTimePickerDesigner : ControlDesigner { public DateTimePickerDesigner() { AutoResizeHandles = true; } ////// Provides rich design time behavior for the /// DateTimePicker control. /// ////// /// 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
- EntitySetRetriever.cs
- BitmapPalette.cs
- DeflateEmulationStream.cs
- DecoderFallback.cs
- StringHelper.cs
- GridViewRowCollection.cs
- ContentElement.cs
- JavaScriptSerializer.cs
- SmiGettersStream.cs
- EventBindingService.cs
- ToolStripRendererSwitcher.cs
- BitmapSourceSafeMILHandle.cs
- MetaTable.cs
- VisualBasicImportReference.cs
- SystemGatewayIPAddressInformation.cs
- DataSourceHelper.cs
- ProgressBar.cs
- Page.cs
- AuthorizationSection.cs
- CodeArrayCreateExpression.cs
- FrameworkReadOnlyPropertyMetadata.cs
- CheckBoxBaseAdapter.cs
- XmlLinkedNode.cs
- SerTrace.cs
- MailHeaderInfo.cs
- ParenthesizePropertyNameAttribute.cs
- PartialList.cs
- LinearGradientBrush.cs
- MediaElementAutomationPeer.cs
- ExpandButtonVisibilityConverter.cs
- ArgumentValue.cs
- RepeaterItem.cs
- SerializableAuthorizationContext.cs
- ClientFormsAuthenticationCredentials.cs
- ListViewTableCell.cs
- HttpApplication.cs
- SemanticValue.cs
- PowerModeChangedEventArgs.cs
- XMLDiffLoader.cs
- OdbcConnectionStringbuilder.cs
- InputEventArgs.cs
- SqlProviderManifest.cs
- DateTimeEditor.cs
- TypeInitializationException.cs
- ModuleConfigurationInfo.cs
- _DisconnectOverlappedAsyncResult.cs
- CompilerError.cs
- followingsibling.cs
- RadioButton.cs
- ScriptingWebServicesSectionGroup.cs
- DefaultTraceListener.cs
- PropertyIDSet.cs
- GregorianCalendarHelper.cs
- DataGridCheckBoxColumn.cs
- _SafeNetHandles.cs
- OutputCacheSettings.cs
- HandlerMappingMemo.cs
- CounterSetInstanceCounterDataSet.cs
- BooleanFunctions.cs
- _NTAuthentication.cs
- LookupNode.cs
- DataTablePropertyDescriptor.cs
- HttpMethodConstraint.cs
- Condition.cs
- ActivityPropertyReference.cs
- TagMapCollection.cs
- AspCompat.cs
- counter.cs
- ArrayTypeMismatchException.cs
- Function.cs
- HttpWriter.cs
- ToolBarDesigner.cs
- PathGeometry.cs
- Stack.cs
- LongTypeConverter.cs
- X509ChainPolicy.cs
- EndpointAddressElementBase.cs
- XamlTypeMapper.cs
- SqlDataSourceParameterParser.cs
- DrawToolTipEventArgs.cs
- ServiceDocumentFormatter.cs
- MultiByteCodec.cs
- WebPartEditVerb.cs
- MessageQueuePermission.cs
- DeviceContext2.cs
- MiniConstructorInfo.cs
- sqlinternaltransaction.cs
- MenuAdapter.cs
- Stream.cs
- AppDomain.cs
- EntitySqlQueryCacheKey.cs
- ViewBase.cs
- PerformanceCounterCategory.cs
- Rect3DConverter.cs
- TrustManagerPromptUI.cs
- ResourceDisplayNameAttribute.cs
- Events.cs
- FileDetails.cs
- BrowserDefinition.cs
- DataGridLinkButton.cs