Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / ToolBarDesigner.cs / 1 / ToolBarDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.ToolBarDesigner..ctor()")] namespace System.Windows.Forms.Design { using System.Runtime.InteropServices; using System.ComponentModel; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.Windows.Forms; using System.Collections; ////// This class handles all design time behavior for the status bar class. /// internal class ToolBarDesigner : ControlDesigner { public ToolBarDesigner() { AutoResizeHandles = true; } ////// /// public override ICollection AssociatedComponents{ get { ToolBar tb = Control as ToolBar; if (tb != null) { return tb.Buttons; } return base.AssociatedComponents; } } ////// Retrieves a list of associated components. These are components that should be incluced in a cut or copy operation on this component. /// ////// /// 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; PropertyDescriptor propDock = TypeDescriptor.GetProperties(component)["Dock"]; PropertyDescriptor propAutoSize = TypeDescriptor.GetProperties(component)["AutoSize"]; if (propDock != null && propAutoSize != null) { DockStyle dock = (DockStyle)propDock.GetValue(component); bool autoSize = (bool)propAutoSize.GetValue(component); if (autoSize) { rules &= ~(SelectionRules.TopSizeable | SelectionRules.BottomSizeable); if (dock != DockStyle.None) { rules &= ~SelectionRules.AllSizeable; } } } 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
- WebPartConnectionsDisconnectVerb.cs
- HttpProtocolReflector.cs
- ButtonColumn.cs
- XslTransform.cs
- XMLSchema.cs
- SevenBitStream.cs
- ButtonRenderer.cs
- PropertyEmitter.cs
- MatrixTransform3D.cs
- ReversePositionQuery.cs
- ServiceModelEnumValidatorAttribute.cs
- Evaluator.cs
- RangeEnumerable.cs
- FieldMetadata.cs
- EpmAttributeNameBuilder.cs
- SerializationHelper.cs
- WindowsComboBox.cs
- FileIOPermission.cs
- PropertyChangedEventManager.cs
- DataGridLength.cs
- XmlCompatibilityReader.cs
- ColorPalette.cs
- Transform.cs
- ClientTargetCollection.cs
- Baml6Assembly.cs
- WrapPanel.cs
- PathTooLongException.cs
- TableHeaderCell.cs
- SystemColors.cs
- DrawingState.cs
- InkCanvasFeedbackAdorner.cs
- StringUtil.cs
- DynamicRendererThreadManager.cs
- RadioButton.cs
- CSharpCodeProvider.cs
- Visual3D.cs
- ConfigXmlDocument.cs
- SafeNativeMethods.cs
- RegexRunnerFactory.cs
- MarshalByRefObject.cs
- Brush.cs
- CancellationState.cs
- DataGridViewComboBoxEditingControl.cs
- DataRowExtensions.cs
- MetaType.cs
- SoapInteropTypes.cs
- CompilationSection.cs
- HttpRuntime.cs
- ReliableSessionElement.cs
- ButtonStandardAdapter.cs
- CompModSwitches.cs
- TrustLevelCollection.cs
- SubstitutionList.cs
- PropertyDescriptorGridEntry.cs
- dataprotectionpermission.cs
- NewArray.cs
- Timeline.cs
- SQLDouble.cs
- CheckedListBox.cs
- ValueConversionAttribute.cs
- FileUtil.cs
- XamlValidatingReader.cs
- UserPreferenceChangedEventArgs.cs
- datacache.cs
- HMACSHA1.cs
- SecurityCriticalDataForSet.cs
- Logging.cs
- TextRangeBase.cs
- NativeMethods.cs
- Thumb.cs
- XmlName.cs
- ToolStripDropDown.cs
- ContextMenuStrip.cs
- FileDataSourceCache.cs
- DependencyPropertyKey.cs
- CapiNative.cs
- SqlDataSourceCache.cs
- Size3DValueSerializer.cs
- AccessKeyManager.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- XmlExpressionDumper.cs
- DbSetClause.cs
- autovalidator.cs
- XmlSchemaNotation.cs
- DataSetViewSchema.cs
- DynamicDocumentPaginator.cs
- DocumentViewerHelper.cs
- EventMappingSettings.cs
- ExpressionCopier.cs
- ProfilePropertySettingsCollection.cs
- UiaCoreTypesApi.cs
- GridViewCommandEventArgs.cs
- OdbcRowUpdatingEvent.cs
- UniqueID.cs
- HttpCachePolicy.cs
- CultureInfo.cs
- Registry.cs
- FilterableData.cs
- SafeNativeMethods.cs
- ListenerSessionConnection.cs