Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / DesignerOptions.cs / 1 / DesignerOptions.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.Design { using Microsoft.Win32; using System; using System.Design; using System.Drawing; using System.ComponentModel.Design; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; ////// /// Provides access to get and set option values for a designer. /// public class DesignerOptions { private const int minGridSize = 2; private const int maxGridSize = 200; private bool showGrid = true; private bool snapToGrid = true; private Size gridSize = new Size(8,8); private bool useSnapLines = false; private bool useSmartTags = false; private bool objectBoundSmartTagAutoShow = true; private bool enableComponentCache = false; private bool enableInSituEditing = true; ////// /// Creates a new DesignerOptions object. /// public DesignerOptions() { } ////// Public GridSize property. /// [SRCategory(SR.DesignerOptions_LayoutSettings)] [SRDescription(SR.DesignerOptions_GridSizeDesc)] public virtual Size GridSize { get { return gridSize; } set { //do some validation checking here if (value.Width < minGridSize) value.Width = minGridSize; if (value.Height < minGridSize) value.Height = minGridSize; if (value.Width > maxGridSize) value.Width = maxGridSize; if (value.Height > maxGridSize) value.Height = maxGridSize; gridSize = value; } } ////// Public ShowGrid property. /// [SRCategory(SR.DesignerOptions_LayoutSettings)] [SRDescription(SR.DesignerOptions_ShowGridDesc)] public virtual bool ShowGrid { get { return showGrid; } set { showGrid = value; } } ////// Public SnapToGrid property. /// [SRCategory(SR.DesignerOptions_LayoutSettings)] [SRDescription(SR.DesignerOptions_SnapToGridDesc)] public virtual bool SnapToGrid { get { return snapToGrid; } set { snapToGrid = value; } } ////// /// This property enables or disables snaplines in the designer. /// [SRCategory(SR.DesignerOptions_LayoutSettings)] [SRDescription(SR.DesignerOptions_UseSnapLines)] public virtual bool UseSnapLines { get { return useSnapLines; } set { useSnapLines = value; } } ////// /// This property enables or disables smart tags in the designer. /// [SRCategory(SR.DesignerOptions_LayoutSettings)] [SRDescription(SR.DesignerOptions_UseSmartTags)] public virtual bool UseSmartTags { get { return useSmartTags; } set { useSmartTags = value; } } ////// /// This property enables or disables smart tags in the designer. /// [SRDisplayName(SR.DesignerOptions_ObjectBoundSmartTagAutoShowDisplayName)] [SRCategory(SR.DesignerOptions_ObjectBoundSmartTagSettings)] [SRDescription(SR.DesignerOptions_ObjectBoundSmartTagAutoShow)] public virtual bool ObjectBoundSmartTagAutoShow { get { return objectBoundSmartTagAutoShow; } set { objectBoundSmartTagAutoShow = value; } } ////// /// This property enables or disables the component cache /// [SRDisplayName(SR.DesignerOptions_CodeGenDisplay)] [SRCategory(SR.DesignerOptions_CodeGenSettings)] [SRDescription(SR.DesignerOptions_OptimizedCodeGen)] public virtual bool UseOptimizedCodeGeneration { get { return enableComponentCache; } set { enableComponentCache = value; } } ////// /// This property enables or disables the InSitu Editing for ToolStrips /// [SRDisplayName(SR.DesignerOptions_EnableInSituEditingDisplay)] [SRCategory(SR.DesignerOptions_EnableInSituEditingCat)] [SRDescription(SR.DesignerOptions_EnableInSituEditingDesc)] [Browsable(false)] public virtual bool EnableInSituEditing { get { return enableInSituEditing; } set { enableInSituEditing = value; } } } } // 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
- DocumentSignatureManager.cs
- SessionPageStatePersister.cs
- ReflectEventDescriptor.cs
- IIS7UserPrincipal.cs
- QueryStringParameter.cs
- SimpleColumnProvider.cs
- RadialGradientBrush.cs
- WebConfigurationHostFileChange.cs
- IOThreadTimer.cs
- GetPageCompletedEventArgs.cs
- IntegerFacetDescriptionElement.cs
- BitmapEditor.cs
- BuilderPropertyEntry.cs
- LinkConverter.cs
- LinkedResourceCollection.cs
- BufferedWebEventProvider.cs
- DebugView.cs
- MemberInfoSerializationHolder.cs
- RuntimeConfigLKG.cs
- SerializationStore.cs
- SchemaObjectWriter.cs
- ShapeTypeface.cs
- StringReader.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CompositionCommandSet.cs
- DataGridViewControlCollection.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- XmlSchemaDatatype.cs
- MasterPageCodeDomTreeGenerator.cs
- COM2EnumConverter.cs
- returneventsaver.cs
- ScriptIgnoreAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- VirtualizingPanel.cs
- XmlTextAttribute.cs
- CalendarDateRange.cs
- SelectionItemProviderWrapper.cs
- AttachedPropertyDescriptor.cs
- WebServiceData.cs
- ToolStripSplitButton.cs
- SystemKeyConverter.cs
- FileUpload.cs
- HyperLinkStyle.cs
- SynchronizedInputHelper.cs
- KeyedQueue.cs
- MenuItemAutomationPeer.cs
- XmlTypeAttribute.cs
- HtmlShimManager.cs
- PresentationSource.cs
- PrintDialogException.cs
- X509CertificateCollection.cs
- CookieProtection.cs
- StylusSystemGestureEventArgs.cs
- ObjectKeyFrameCollection.cs
- PeerNameRecord.cs
- XPathDocumentBuilder.cs
- MissingMemberException.cs
- DbConnectionHelper.cs
- WpfSharedBamlSchemaContext.cs
- DiscoveryMessageSequence11.cs
- XsdBuildProvider.cs
- ConfigurationManagerInternalFactory.cs
- RequestCachePolicyConverter.cs
- QilExpression.cs
- FormsAuthenticationCredentials.cs
- WindowsAltTab.cs
- GatewayDefinition.cs
- GestureRecognizer.cs
- SoapServerMessage.cs
- CollectionsUtil.cs
- PropertyTabAttribute.cs
- linebase.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- TemplateLookupAction.cs
- CodeDelegateCreateExpression.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DesignTimeVisibleAttribute.cs
- ScriptResourceHandler.cs
- NumericUpDownAcceleration.cs
- ArglessEventHandlerProxy.cs
- RestHandlerFactory.cs
- Point.cs
- ComponentDispatcher.cs
- Zone.cs
- QilTypeChecker.cs
- EllipticalNodeOperations.cs
- DropDownHolder.cs
- SqlMetaData.cs
- ConfigurationManagerHelper.cs
- DomainConstraint.cs
- CodeDirectionExpression.cs
- TemplateColumn.cs
- WebPartAuthorizationEventArgs.cs
- Imaging.cs
- DbConnectionStringCommon.cs
- SqlBulkCopy.cs
- VirtualPath.cs
- XPathScanner.cs
- RotateTransform3D.cs
- EntitySqlException.cs