Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / WizardStepBase.cs / 2 / WizardStepBase.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.CodeDom.Compiler; using System.Collections; using System.ComponentModel; using System.Security.Permissions; using System.Web; using System.Web.UI; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class WizardStepControlBuilder : ControlBuilder { internal override void SetParentBuilder(ControlBuilder parentBuilder) { // Do not if (Parser.FInDesigner || Parser is PageThemeParser) return; if (parentBuilder.ControlType == null || !(typeof(WizardStepCollection).IsAssignableFrom(parentBuilder.ControlType))) { throw new HttpException(SR.GetString(SR.WizardStep_WrongContainment)); } base.SetParentBuilder(parentBuilder); } } [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] [ Bindable(false), ControlBuilderAttribute(typeof(WizardStepControlBuilder)), ToolboxItem(false) ] public abstract class WizardStepBase : View { private Wizard _owner; [ WebCategory("Behavior"), Themeable(false), Filterable(false), DefaultValue(true), WebSysDescription(SR.WizardStep_AllowReturn) ] public virtual bool AllowReturn { get { object o = ViewState["AllowReturn"]; return o == null? true : (bool)o; } set { ViewState["AllowReturn"] = value; } } ////// [ Browsable(true) ] public override bool EnableTheming { get { return base.EnableTheming; } set { base.EnableTheming = value; } } public override string ID { get { return base.ID; } set { // if (Owner != null && Owner.DesignMode) { if (!CodeGenerator.IsValidLanguageIndependentIdentifier(value)) { throw new ArgumentException(SR.GetString(SR.Invalid_identifier, value)); } if (value != null && value.Equals(Owner.ID, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException(SR.GetString(SR.Id_already_used, value)); } foreach (WizardStepBase step in Owner.WizardSteps) { if (step == this) { continue; } if (step.ID != null && step.ID.Equals(value, StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException(SR.GetString(SR.Id_already_used, value)); } } } base.ID = value; } } [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), WebCategory("Appearance"), WebSysDescription(SR.WizardStep_Name) ] public virtual String Name { get { if (!String.IsNullOrEmpty(Title)) { return Title; } if (!String.IsNullOrEmpty(ID)) { return ID; } return null; } } internal virtual Wizard Owner { get { return _owner; } set { _owner = value; } } [ WebCategory("Behavior"), DefaultValue(WizardStepType.Auto), WebSysDescription(SR.WizardStep_StepType) ] public virtual WizardStepType StepType { get { object o = ViewState["StepType"]; return o == null? WizardStepType.Auto : (WizardStepType)o; } set { if (value < WizardStepType.Auto || value > WizardStepType.Step) { throw new ArgumentOutOfRangeException("value"); } if (StepType != value) { ViewState["StepType"] = value; if (Owner != null) { Owner.OnWizardStepsChanged(); } } } } ///Gets and sets a value indicating whether theme is enabled. ////// [ DefaultValue(""), Localizable(true), WebCategory("Appearance"), WebSysDescription(SR.WizardStep_Title) ] public virtual string Title { get { string s = (string)ViewState["Title"]; return((s == null) ? String.Empty : s); } set { if (Title != value) { ViewState["Title"] = value; if (Owner != null) { Owner.OnWizardStepsChanged(); } } } } internal string TitleInternal { get { return (string)ViewState["Title"]; } } [ Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced), WebCategory("Appearance"), ] public Wizard Wizard { get { return Owner; } } // protected override void LoadViewState(object savedState) { if (savedState != null) { base.LoadViewState(savedState); if (Owner != null && (ViewState["Title"] != null || ViewState["StepType"] != null)) { Owner.OnWizardStepsChanged(); } } } protected internal override void OnLoad(EventArgs e) { base.OnLoad(e); if (Owner == null && !DesignMode) { throw new InvalidOperationException(SR.GetString(SR.WizardStep_WrongContainment)); } } protected internal override void RenderChildren(HtmlTextWriter writer) { if (!Owner.ShouldRenderChildControl) { return; } base.RenderChildren(writer); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.Gets or sets the title on the ///.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlDocumentFieldSchema.cs
- SqlTransaction.cs
- AuthenticationSection.cs
- SQLGuidStorage.cs
- XmlIgnoreAttribute.cs
- KeyValueConfigurationCollection.cs
- CurrentChangingEventManager.cs
- BaseCodePageEncoding.cs
- DesignerAdRotatorAdapter.cs
- PathFigureCollection.cs
- ChameleonKey.cs
- cookieexception.cs
- RemoveStoryboard.cs
- KeyEvent.cs
- CounterCreationDataConverter.cs
- GeometryModel3D.cs
- BaseCollection.cs
- PassportPrincipal.cs
- AssemblyFilter.cs
- XamlTypeMapper.cs
- IdentityHolder.cs
- SelectedGridItemChangedEvent.cs
- ScriptManager.cs
- EventLogRecord.cs
- PermissionListSet.cs
- Wrapper.cs
- ResizeGrip.cs
- Properties.cs
- IntAverageAggregationOperator.cs
- TemplateBuilder.cs
- DefaultTextStore.cs
- PageCache.cs
- XmlValueConverter.cs
- SocketElement.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- Attachment.cs
- StreamedFramingRequestChannel.cs
- SafeNativeMethods.cs
- UIAgentAsyncParams.cs
- SrgsToken.cs
- RowsCopiedEventArgs.cs
- Module.cs
- GenericEnumerator.cs
- InvokeProviderWrapper.cs
- Vector3D.cs
- SafeMemoryMappedFileHandle.cs
- CommandValueSerializer.cs
- ResourceContainer.cs
- DesignObjectWrapper.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ModuleBuilderData.cs
- Geometry3D.cs
- WorkflowClientDeliverMessageWrapper.cs
- RequestCacheManager.cs
- ClrProviderManifest.cs
- DocumentViewerBaseAutomationPeer.cs
- PrinterSettings.cs
- BindingWorker.cs
- XmlArrayItemAttributes.cs
- UnicastIPAddressInformationCollection.cs
- DrawingContextWalker.cs
- MimeTypePropertyAttribute.cs
- SignatureSummaryDialog.cs
- ReadOnlyHierarchicalDataSource.cs
- HwndProxyElementProvider.cs
- ConsumerConnectionPoint.cs
- SettingsContext.cs
- SqlDataSourceSelectingEventArgs.cs
- TagNameToTypeMapper.cs
- PasswordRecovery.cs
- WeakEventManager.cs
- SatelliteContractVersionAttribute.cs
- XmlAttributeAttribute.cs
- UnsafeNativeMethods.cs
- AggregateNode.cs
- DockPanel.cs
- TextBoxAutomationPeer.cs
- DataGridViewCheckBoxColumn.cs
- ClassHandlersStore.cs
- ping.cs
- TreeNode.cs
- BindingList.cs
- ping.cs
- GridViewRowCollection.cs
- Compiler.cs
- SafeFileHandle.cs
- XmlMembersMapping.cs
- ServiceOperationDetailViewControl.cs
- DBAsyncResult.cs
- InkCanvas.cs
- SvcMapFileSerializer.cs
- DataBoundLiteralControl.cs
- ChangeDirector.cs
- IriParsingElement.cs
- VirtualPathUtility.cs
- CodePrimitiveExpression.cs
- CurrentChangingEventArgs.cs
- Conditional.cs
- ResXResourceWriter.cs
- DataMemberConverter.cs