Code:
/ DotNET / DotNET / 8.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
- LambdaCompiler.Expressions.cs
- XmlHierarchicalDataSourceView.cs
- ZipIORawDataFileBlock.cs
- CompiledQueryCacheKey.cs
- AppDomainUnloadedException.cs
- DataGridViewCellCancelEventArgs.cs
- COAUTHINFO.cs
- TextEffectResolver.cs
- MouseCaptureWithinProperty.cs
- AuthenticationModuleElementCollection.cs
- AuthorizationContext.cs
- SafeCryptHandles.cs
- ObjectConverter.cs
- XmlReflectionMember.cs
- IHttpResponseInternal.cs
- GraphicsState.cs
- TypedColumnHandler.cs
- ErrorInfoXmlDocument.cs
- CookieProtection.cs
- ListViewPagedDataSource.cs
- FileUpload.cs
- DragDrop.cs
- TableCell.cs
- Point3DCollectionValueSerializer.cs
- CollaborationHelperFunctions.cs
- WindowsGraphicsWrapper.cs
- PropertyIDSet.cs
- StateMachineAction.cs
- DataServiceRequestOfT.cs
- FragmentQueryProcessor.cs
- StrokeNodeEnumerator.cs
- XmlReaderSettings.cs
- PartialArray.cs
- WebPartZoneBase.cs
- DropShadowEffect.cs
- MediaScriptCommandRoutedEventArgs.cs
- NodeFunctions.cs
- CheckBoxBaseAdapter.cs
- CodeAccessSecurityEngine.cs
- DrawingCollection.cs
- __ConsoleStream.cs
- AddingNewEventArgs.cs
- WindowManager.cs
- VisualBasicSettings.cs
- QilBinary.cs
- Annotation.cs
- FlowDocumentReaderAutomationPeer.cs
- keycontainerpermission.cs
- DelayDesigner.cs
- DateTimeParse.cs
- HtmlWindowCollection.cs
- MessageBox.cs
- DesignerActionMethodItem.cs
- DeadCharTextComposition.cs
- DataViewSettingCollection.cs
- TextServicesHost.cs
- ComplexPropertyEntry.cs
- SafeLocalMemHandle.cs
- ClientOptions.cs
- GenericPrincipal.cs
- SymbolPair.cs
- PolicyStatement.cs
- InstanceOwner.cs
- AxHost.cs
- HandleRef.cs
- HtmlTernaryTree.cs
- WmpBitmapEncoder.cs
- HtmlSelectionListAdapter.cs
- SimpleApplicationHost.cs
- ImageField.cs
- SqlInternalConnection.cs
- StatusBarAutomationPeer.cs
- QilInvokeLateBound.cs
- Wizard.cs
- HttpServerUtilityWrapper.cs
- FixedTextBuilder.cs
- PixelFormatConverter.cs
- StorageEntityContainerMapping.cs
- BitmapFrameEncode.cs
- ParseElementCollection.cs
- TrackingAnnotationCollection.cs
- ControlUtil.cs
- WebOperationContext.cs
- unsafeIndexingFilterStream.cs
- DataBoundControl.cs
- TableLayoutPanelCodeDomSerializer.cs
- TreeNodeEventArgs.cs
- RealProxy.cs
- MonthChangedEventArgs.cs
- QilUnary.cs
- TemplatedWizardStep.cs
- XmlElement.cs
- BufferedReceiveElement.cs
- SecurityRuntime.cs
- TextControl.cs
- DataGridLinkButton.cs
- DiagnosticTraceSchemas.cs
- HierarchicalDataBoundControl.cs
- _ShellExpression.cs
- MessageQueuePermissionAttribute.cs