Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / TrackBarDesigner.cs / 1 / TrackBarDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.TrackBarDesigner..ctor()")] namespace System.Windows.Forms.Design { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; ////// /// internal class TrackBarDesigner : ControlDesigner { public TrackBarDesigner() { AutoResizeHandles = true; } ////// Provides a designer that can design components /// that extend TrackBar. ////// /// 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; object component = Component; //VSWhidbey # 369288 rules |= SelectionRules.AllSizeable; PropertyDescriptor propAutoSize = TypeDescriptor.GetProperties(component)["AutoSize"]; if (propAutoSize != null) { bool autoSize = (bool)propAutoSize.GetValue(component); PropertyDescriptor propOrientation = TypeDescriptor.GetProperties(component)["Orientation"]; Orientation or = Orientation.Horizontal; if (propOrientation != null) { or = (Orientation)propOrientation.GetValue(component); } if (autoSize) { if (or == Orientation.Horizontal) { rules &= ~(SelectionRules.TopSizeable | SelectionRules.BottomSizeable); } else if (or == Orientation.Vertical) { rules &= ~(SelectionRules.LeftSizeable | SelectionRules.RightSizeable); } } } return rules; } } } } // 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
- TextReader.cs
- SQLGuid.cs
- ColumnMapVisitor.cs
- NativeWindow.cs
- TextParentUndoUnit.cs
- NGCPageContentCollectionSerializerAsync.cs
- BaseTemplateParser.cs
- UserNameSecurityToken.cs
- DoubleLinkListEnumerator.cs
- MiniParameterInfo.cs
- RelationshipNavigation.cs
- BamlResourceContent.cs
- CookielessData.cs
- ProfessionalColorTable.cs
- SchemaImporterExtensionsSection.cs
- RootBrowserWindowAutomationPeer.cs
- FileUtil.cs
- ImageCodecInfoPrivate.cs
- ConfigurationManagerHelper.cs
- XmlAnyAttributeAttribute.cs
- NameValueConfigurationCollection.cs
- ListViewCancelEventArgs.cs
- TriggerBase.cs
- ZipArchive.cs
- RequestCacheManager.cs
- FlowStep.cs
- Publisher.cs
- DataGridViewCellStyleConverter.cs
- BamlLocalizer.cs
- SqlDataSourceConnectionPanel.cs
- PointAnimationUsingKeyFrames.cs
- IResourceProvider.cs
- FormsAuthentication.cs
- NameSpaceExtractor.cs
- HttpWebRequest.cs
- DiscoveryClientRequestChannel.cs
- BaseResourcesBuildProvider.cs
- ExpandSegmentCollection.cs
- BaseDataBoundControl.cs
- WebPartEventArgs.cs
- Process.cs
- TimeZone.cs
- GroupLabel.cs
- PageStatePersister.cs
- ToolboxComponentsCreatedEventArgs.cs
- StdValidatorsAndConverters.cs
- CLSCompliantAttribute.cs
- CreatingCookieEventArgs.cs
- GlobalProxySelection.cs
- CodeDelegateInvokeExpression.cs
- DataGridViewCellLinkedList.cs
- DeclarativeCatalogPart.cs
- IOThreadScheduler.cs
- ContentPlaceHolder.cs
- XmlSchemaComplexContentExtension.cs
- ThumbAutomationPeer.cs
- RestHandler.cs
- BufferedWebEventProvider.cs
- FontResourceCache.cs
- ResourceExpressionBuilder.cs
- StorageBasedPackageProperties.cs
- ListBase.cs
- Mappings.cs
- DataColumn.cs
- PixelFormats.cs
- TextureBrush.cs
- InteropExecutor.cs
- CoreSwitches.cs
- HtmlFormWrapper.cs
- RadioButton.cs
- Grammar.cs
- PersonalizationAdministration.cs
- ContextInformation.cs
- Constraint.cs
- DetailsViewInsertEventArgs.cs
- ControlType.cs
- TextFormatter.cs
- ValueChangedEventManager.cs
- XamlSerializer.cs
- SqlFlattener.cs
- RTLAwareMessageBox.cs
- SqlClientWrapperSmiStreamChars.cs
- SystemIcmpV4Statistics.cs
- HScrollBar.cs
- GridView.cs
- DashStyle.cs
- Win32Exception.cs
- Listbox.cs
- ParameterExpression.cs
- DetailsViewCommandEventArgs.cs
- HistoryEventArgs.cs
- LoginUtil.cs
- InputBuffer.cs
- SafeArrayTypeMismatchException.cs
- TextTreeTextNode.cs
- PageThemeBuildProvider.cs
- XmlAtomicValue.cs
- ItemContainerPattern.cs
- InstanceDataCollectionCollection.cs
- CodeTypeDeclaration.cs