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; ////// /// 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
- DataControlFieldHeaderCell.cs
- ListItemCollection.cs
- ParagraphVisual.cs
- RefType.cs
- WebPartConnectionsCloseVerb.cs
- ButtonPopupAdapter.cs
- MetafileHeader.cs
- RelationshipWrapper.cs
- SvcMapFileSerializer.cs
- TransformProviderWrapper.cs
- AuthorizationSection.cs
- ControlType.cs
- BinaryFormatterWriter.cs
- Pkcs7Recipient.cs
- DocumentGridPage.cs
- TransactionContextManager.cs
- ActivityExecutorSurrogate.cs
- BeginStoryboard.cs
- _DigestClient.cs
- ApplicationException.cs
- TypeInfo.cs
- ElementNotAvailableException.cs
- TypeDependencyAttribute.cs
- StartUpEventArgs.cs
- OperandQuery.cs
- FormsAuthenticationCredentials.cs
- WebHeaderCollection.cs
- SqlParameterizer.cs
- DllNotFoundException.cs
- EventLogPermissionEntryCollection.cs
- GetPageNumberCompletedEventArgs.cs
- SAPICategories.cs
- EditorBrowsableAttribute.cs
- PreloadHost.cs
- TextRunCache.cs
- ContainerControl.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- XmlLinkedNode.cs
- DataGridViewColumnEventArgs.cs
- JsonEnumDataContract.cs
- HelpEvent.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- Internal.cs
- WizardPanelChangingEventArgs.cs
- ToolStripRenderer.cs
- AssemblyUtil.cs
- ProxyOperationRuntime.cs
- TreeNodeCollectionEditor.cs
- HtmlElementEventArgs.cs
- MessageQueue.cs
- PersonalizationProviderHelper.cs
- HttpListenerTimeoutManager.cs
- TypeUnloadedException.cs
- DispatcherFrame.cs
- PackWebRequestFactory.cs
- LongAverageAggregationOperator.cs
- StateMachineWorkflow.cs
- RuleInfoComparer.cs
- SQLGuid.cs
- Action.cs
- ObjectSpanRewriter.cs
- QilBinary.cs
- AssemblyUtil.cs
- DependencySource.cs
- DataObject.cs
- Camera.cs
- ResetableIterator.cs
- NTAccount.cs
- DeploymentSectionCache.cs
- UIElementParaClient.cs
- UserControlBuildProvider.cs
- Int32Converter.cs
- ToolBar.cs
- _AutoWebProxyScriptHelper.cs
- SelectionRangeConverter.cs
- ClientScriptManager.cs
- ImageFormat.cs
- EntityDataReader.cs
- SurrogateSelector.cs
- ServicePointManager.cs
- LabelLiteral.cs
- ToolBarTray.cs
- SmtpFailedRecipientException.cs
- MSAAEventDispatcher.cs
- XmlNode.cs
- TranslateTransform.cs
- Pair.cs
- NameValueFileSectionHandler.cs
- TextRangeEditLists.cs
- PageBreakRecord.cs
- BoundingRectTracker.cs
- LineInfo.cs
- ColorInterpolationModeValidation.cs
- AutomationElement.cs
- FixedSOMGroup.cs
- MissingManifestResourceException.cs
- PageThemeBuildProvider.cs
- CookieHandler.cs
- ToggleButton.cs
- CustomError.cs