Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebParts / ToolZoneDesigner.cs / 1 / ToolZoneDesigner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.Design.WebControls.WebParts {
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Design;
using System.Web.UI.WebControls.WebParts;
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
public class ToolZoneDesigner : WebZoneDesigner {
public override DesignerActionListCollection ActionLists {
get {
DesignerActionListCollection actionLists = new DesignerActionListCollection();
actionLists.AddRange(base.ActionLists);
actionLists.Add(new ToolZoneDesignerActionList(this));
return actionLists;
}
}
protected bool ViewInBrowseMode {
get {
object o = DesignerState["ViewInBrowseMode"];
return (o != null) ? (bool)o : false;
}
private set {
if (value != ViewInBrowseMode) {
DesignerState["ViewInBrowseMode"] = value;
UpdateDesignTimeHtml();
}
}
}
public override void Initialize(IComponent component) {
VerifyInitializeArgument(component, typeof(ToolZone));
base.Initialize(component);
}
private class ToolZoneDesignerActionList : DesignerActionList {
private ToolZoneDesigner _parent;
public ToolZoneDesignerActionList(ToolZoneDesigner parent) : base (parent.Component){
_parent = parent;
}
public override bool AutoShow {
get {
return true;
}
set {
}
}
public bool ViewInBrowseMode {
get {
return _parent.ViewInBrowseMode;
}
set {
_parent.ViewInBrowseMode = value;
}
}
public override DesignerActionItemCollection GetSortedActionItems() {
DesignerActionItemCollection items = new DesignerActionItemCollection();
items.Add(new DesignerActionPropertyItem("ViewInBrowseMode",
SR.GetString(SR.ToolZoneDesigner_ViewInBrowseMode),
String.Empty,
SR.GetString(SR.ToolZoneDesigner_ViewInBrowseModeDesc)));
return items;
}
}
}
}
// 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
- ConfigXmlWhitespace.cs
- ProfileServiceManager.cs
- XmlDataSourceView.cs
- SQLRoleProvider.cs
- Point3D.cs
- EdmPropertyAttribute.cs
- SocketCache.cs
- XamlLoadErrorInfo.cs
- DefaultValueTypeConverter.cs
- AppSettingsSection.cs
- InteropAutomationProvider.cs
- Shape.cs
- ModelEditingScope.cs
- DetailsViewPageEventArgs.cs
- MenuItemBindingCollection.cs
- TdsParserHelperClasses.cs
- DocumentViewerHelper.cs
- TrustLevelCollection.cs
- PersonalizationProviderHelper.cs
- ConfigurationManagerHelperFactory.cs
- HandlerElementCollection.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- NativeMethodsOther.cs
- LinkLabel.cs
- LocalizationComments.cs
- ScriptManager.cs
- ClientClassGenerator.cs
- IDispatchConstantAttribute.cs
- NavigatorInput.cs
- MasterPageParser.cs
- HtmlEncodedRawTextWriter.cs
- ConnectionStringSettingsCollection.cs
- CodeLabeledStatement.cs
- DefaultCommandExtensionCallback.cs
- SqlCachedBuffer.cs
- ReaderOutput.cs
- SimplePropertyEntry.cs
- XmlBinaryWriterSession.cs
- COM2ComponentEditor.cs
- InkCanvasSelection.cs
- WebPartCatalogCloseVerb.cs
- ManipulationDeltaEventArgs.cs
- Int64Storage.cs
- ThemeConfigurationDialog.cs
- InfoCardTrace.cs
- StandardCommands.cs
- SqlCacheDependencyDatabaseCollection.cs
- TickBar.cs
- RegexRunner.cs
- ApplicationDirectory.cs
- ChildChangedEventArgs.cs
- ReturnType.cs
- DocComment.cs
- AspNetSynchronizationContext.cs
- TemplateEditingVerb.cs
- LineGeometry.cs
- InvalidEnumArgumentException.cs
- KeyTime.cs
- ScriptingProfileServiceSection.cs
- OleDbPermission.cs
- DefaultHttpHandler.cs
- FontDialog.cs
- ConfigXmlElement.cs
- ToolStripContainerActionList.cs
- VarInfo.cs
- RuntimeWrappedException.cs
- TreeViewImageKeyConverter.cs
- LocatorManager.cs
- FrameworkContentElement.cs
- DocumentScope.cs
- ImmutableAssemblyCacheEntry.cs
- LinearQuaternionKeyFrame.cs
- NetNamedPipeBindingElement.cs
- ToolStrip.cs
- ChildTable.cs
- ConsoleEntryPoint.cs
- SessionIDManager.cs
- BulletedList.cs
- SQLDoubleStorage.cs
- X509ChainPolicy.cs
- Point3DAnimationUsingKeyFrames.cs
- GenerateTemporaryTargetAssembly.cs
- PagesChangedEventArgs.cs
- InternalDispatchObject.cs
- CheckBox.cs
- SafeLibraryHandle.cs
- XmlEnumAttribute.cs
- ObjectDataSourceDisposingEventArgs.cs
- CodeMethodReturnStatement.cs
- ProjectionCamera.cs
- ToolStripDropTargetManager.cs
- AvTraceDetails.cs
- InvalidCastException.cs
- PagedDataSource.cs
- WebPartEventArgs.cs
- SafeNativeMethods.cs
- MultipartContentParser.cs
- ControlValuePropertyAttribute.cs
- XmlSchemaNotation.cs
- DataServiceQueryOfT.cs