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
- WmlImageAdapter.cs
- DataRecord.cs
- RequestCacheManager.cs
- DesignerOptionService.cs
- EntityCommandExecutionException.cs
- UrlPath.cs
- FrameworkElementFactory.cs
- Stroke.cs
- CssStyleCollection.cs
- Calendar.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- ClientConfigurationHost.cs
- NavigationService.cs
- GenerateScriptTypeAttribute.cs
- DictionaryBase.cs
- RbTree.cs
- StringBuilder.cs
- CompositeTypefaceMetrics.cs
- ModelProperty.cs
- PointAnimation.cs
- BamlLocalizableResourceKey.cs
- MemoryMappedViewStream.cs
- DataStreamFromComStream.cs
- FileDialogCustomPlace.cs
- RangeExpression.cs
- securitymgrsite.cs
- HashAlgorithm.cs
- FieldAccessException.cs
- CalendarDay.cs
- ConfigurationStrings.cs
- ComAdminInterfaces.cs
- ExportOptions.cs
- CodeAttributeArgument.cs
- _CacheStreams.cs
- Module.cs
- FileDialog_Vista.cs
- XmlName.cs
- ProfileServiceManager.cs
- UserControlAutomationPeer.cs
- Page.cs
- HttpsChannelListener.cs
- UIElementAutomationPeer.cs
- ConstraintStruct.cs
- ImageClickEventArgs.cs
- XmlC14NWriter.cs
- BuildProviderInstallComponent.cs
- ImageAutomationPeer.cs
- DataPagerCommandEventArgs.cs
- Brush.cs
- ApplicationException.cs
- XmlDataSourceNodeDescriptor.cs
- GC.cs
- BamlResourceSerializer.cs
- ActionFrame.cs
- ServiceProviders.cs
- RegistrationContext.cs
- DrawingCollection.cs
- XsltInput.cs
- TTSEngineTypes.cs
- ListenerBinder.cs
- SystemWebExtensionsSectionGroup.cs
- WindowsEditBox.cs
- CacheMode.cs
- Formatter.cs
- XPathCompileException.cs
- DataBoundControl.cs
- CustomError.cs
- sqlser.cs
- DetailsViewPagerRow.cs
- HtmlInputHidden.cs
- DispatcherExceptionEventArgs.cs
- ChannelBuilder.cs
- ItemContainerProviderWrapper.cs
- RoutedEvent.cs
- RegisteredHiddenField.cs
- WebPartPersonalization.cs
- SqlTypeConverter.cs
- Util.cs
- EasingQuaternionKeyFrame.cs
- WebProxyScriptElement.cs
- BuildManager.cs
- ActivityInterfaces.cs
- WindowsEditBox.cs
- DataBoundLiteralControl.cs
- BuildManagerHost.cs
- ProjectionCamera.cs
- WeakReferenceEnumerator.cs
- SqlTopReducer.cs
- ASCIIEncoding.cs
- DrawingContextDrawingContextWalker.cs
- SystemPens.cs
- UInt32Converter.cs
- HebrewNumber.cs
- ModifierKeysConverter.cs
- DesignerAdRotatorAdapter.cs
- SessionParameter.cs
- QueuePathEditor.cs
- Options.cs
- ListItemConverter.cs
- ScriptBehaviorDescriptor.cs