Code:
/ DotNET / DotNET / 8.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
- ServiceDescriptions.cs
- SymbolPair.cs
- Models.cs
- NameValueConfigurationElement.cs
- AnnotationObservableCollection.cs
- QuarticEase.cs
- StyleBamlRecordReader.cs
- ChannelTerminatedException.cs
- Char.cs
- WindowsToolbarItemAsMenuItem.cs
- HttpDigestClientElement.cs
- DBCommand.cs
- SQLDateTimeStorage.cs
- PopOutPanel.cs
- ConditionBrowserDialog.cs
- MediaEntryAttribute.cs
- JsonReader.cs
- Column.cs
- NativeCppClassAttribute.cs
- HMACSHA1.cs
- XmlObjectSerializerWriteContext.cs
- Expression.DebuggerProxy.cs
- DiagnosticsConfigurationHandler.cs
- OleDbMetaDataFactory.cs
- MultilineStringConverter.cs
- DataGridParentRows.cs
- FreezableOperations.cs
- HandlerBase.cs
- Vector.cs
- ListViewGroupConverter.cs
- RNGCryptoServiceProvider.cs
- DropTarget.cs
- ServiceCredentialsElement.cs
- MetadataPropertyvalue.cs
- ColumnMap.cs
- _RequestCacheProtocol.cs
- FrugalMap.cs
- Latin1Encoding.cs
- UnmanagedMemoryAccessor.cs
- StringSource.cs
- Triangle.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CodeAccessPermission.cs
- X500Name.cs
- HttpCachePolicyElement.cs
- ProjectionRewriter.cs
- CachingHintValidation.cs
- SortDescriptionCollection.cs
- _Win32.cs
- BindingNavigator.cs
- RevocationPoint.cs
- ListBoxItemAutomationPeer.cs
- ExplicitDiscriminatorMap.cs
- DataGridViewRowEventArgs.cs
- BinaryFormatter.cs
- ExtendedTransformFactory.cs
- CheckBox.cs
- EnumDataContract.cs
- DragDeltaEventArgs.cs
- ADMembershipUser.cs
- ToolStripDropDownItem.cs
- FormClosedEvent.cs
- Timer.cs
- UrlAuthorizationModule.cs
- XmlSchemaParticle.cs
- _ConnectStream.cs
- SemanticValue.cs
- ConfigViewGenerator.cs
- CustomErrorsSection.cs
- UIHelper.cs
- Int16AnimationUsingKeyFrames.cs
- BindingExpression.cs
- TextRenderer.cs
- BoolExpr.cs
- XmlNode.cs
- Mutex.cs
- ChildTable.cs
- RawContentTypeMapper.cs
- EncodedStreamFactory.cs
- ConvertEvent.cs
- ObjectDataSourceFilteringEventArgs.cs
- TextEditorTables.cs
- RequestQueue.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- NotImplementedException.cs
- FlowLayoutPanel.cs
- SqlConnectionPoolProviderInfo.cs
- IOThreadTimer.cs
- TreeNodeCollectionEditor.cs
- DataGridViewRowEventArgs.cs
- ComponentDesigner.cs
- ConfigurationProperty.cs
- HtmlElementEventArgs.cs
- ChildChangedEventArgs.cs
- ResourcePool.cs
- PersonalizationDictionary.cs
- _NetRes.cs
- CryptoApi.cs
- ProfileSettings.cs
- TableHeaderCell.cs