Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Base / Documents / ViewManagerAttribute.cs / 1305376 / ViewManagerAttribute.cs
namespace System.Activities.Presentation.Documents { using System.Activities.Presentation; using System.Activities.Presentation.Internal.Properties; using System; using System.Globalization; ////// This attribute can be placed on the root of a model /// object graph to specify what view manager should be /// used to present the view. /// [AttributeUsage(AttributeTargets.Class, Inherited=true, AllowMultiple=false)] sealed class ViewManagerAttribute : Attribute { private Type _viewManagerType; ////// An empty ViewManagerAttribute allows you to "unset" the view manager from a base class. /// public ViewManagerAttribute() { } ////// Creates a new ViewManager attribute. /// /// The type of view manager to use. The type specified must derive from ViewManager. ///If viewManagerType is null. ///If viewManagerType does not specify a type that derives from ViewManager. public ViewManagerAttribute(Type viewManagerType) { if (viewManagerType == null) throw FxTrace.Exception.ArgumentNull("viewManagerType"); if (!typeof(ViewManager).IsAssignableFrom(viewManagerType)) { throw FxTrace.Exception.AsError(new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidArgumentType, "viewManagerType", typeof(ViewManager).FullName))); } _viewManagerType = viewManagerType; } ////// The type of view manager to create for the model. /// public Type ViewManagerType { get { return _viewManagerType; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Activities.Presentation.Documents { using System.Activities.Presentation; using System.Activities.Presentation.Internal.Properties; using System; using System.Globalization; ////// This attribute can be placed on the root of a model /// object graph to specify what view manager should be /// used to present the view. /// [AttributeUsage(AttributeTargets.Class, Inherited=true, AllowMultiple=false)] sealed class ViewManagerAttribute : Attribute { private Type _viewManagerType; ////// An empty ViewManagerAttribute allows you to "unset" the view manager from a base class. /// public ViewManagerAttribute() { } ////// Creates a new ViewManager attribute. /// /// The type of view manager to use. The type specified must derive from ViewManager. ///If viewManagerType is null. ///If viewManagerType does not specify a type that derives from ViewManager. public ViewManagerAttribute(Type viewManagerType) { if (viewManagerType == null) throw FxTrace.Exception.ArgumentNull("viewManagerType"); if (!typeof(ViewManager).IsAssignableFrom(viewManagerType)) { throw FxTrace.Exception.AsError(new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidArgumentType, "viewManagerType", typeof(ViewManager).FullName))); } _viewManagerType = viewManagerType; } ////// The type of view manager to create for the model. /// public Type ViewManagerType { get { return _viewManagerType; } } } } // 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
- DesignerEditorPartChrome.cs
- RequestResponse.cs
- CreateUserErrorEventArgs.cs
- OptimizedTemplateContent.cs
- CodeSnippetExpression.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- UpDownEvent.cs
- IconBitmapDecoder.cs
- EditorBrowsableAttribute.cs
- HttpHandlersSection.cs
- SynchronizationLockException.cs
- SafeSecurityHandles.cs
- VerificationException.cs
- BrowserDefinitionCollection.cs
- DataControlButton.cs
- ObjectStateFormatter.cs
- InfoCardArgumentException.cs
- ComplexBindingPropertiesAttribute.cs
- DataSourceHelper.cs
- XamlPoint3DCollectionSerializer.cs
- shaperfactory.cs
- SplitContainer.cs
- ConnectionString.cs
- NativeMethods.cs
- sqlinternaltransaction.cs
- TextServicesContext.cs
- FontNamesConverter.cs
- DataGridTablesFactory.cs
- ImageCodecInfoPrivate.cs
- UniqueSet.cs
- TableStyle.cs
- XPathChildIterator.cs
- ProgressBarAutomationPeer.cs
- StateRuntime.cs
- KeyInstance.cs
- ExpressionPrefixAttribute.cs
- ExpressionPrefixAttribute.cs
- ServiceBehaviorAttribute.cs
- BaseResourcesBuildProvider.cs
- ErrorProvider.cs
- QilReference.cs
- FlagsAttribute.cs
- WorkflowMarkupSerializationException.cs
- WebEvents.cs
- ObjectView.cs
- DetailsViewPageEventArgs.cs
- NonSerializedAttribute.cs
- TrackingWorkflowEventArgs.cs
- BufferBuilder.cs
- MetaForeignKeyColumn.cs
- ACL.cs
- DataListAutoFormat.cs
- DesignerDataParameter.cs
- FixedSOMSemanticBox.cs
- HttpSysSettings.cs
- HttpDebugHandler.cs
- UpdatePanel.cs
- ResourceAssociationTypeEnd.cs
- DoubleLink.cs
- Message.cs
- DragDrop.cs
- DecimalAnimation.cs
- Timeline.cs
- Positioning.cs
- SecurityDocument.cs
- VisualState.cs
- ExtenderControl.cs
- HttpAsyncResult.cs
- StrongNameUtility.cs
- CompoundFileStreamReference.cs
- XmlSchemaDatatype.cs
- AddressingVersion.cs
- StyleSheet.cs
- BindingGroup.cs
- RedistVersionInfo.cs
- ConnectionsZoneAutoFormat.cs
- FileEnumerator.cs
- ClaimComparer.cs
- QueryCursorEventArgs.cs
- TypeResolver.cs
- ProcessModuleDesigner.cs
- OAVariantLib.cs
- AttributeEmitter.cs
- WebPartDescriptionCollection.cs
- UserInitiatedNavigationPermission.cs
- RegexCapture.cs
- UnsafeNativeMethodsMilCoreApi.cs
- DebuggerAttributes.cs
- GrammarBuilder.cs
- PackageFilter.cs
- TextRangeEditLists.cs
- BindingList.cs
- DataGridTextColumn.cs
- RootBrowserWindowAutomationPeer.cs
- AutoGeneratedFieldProperties.cs
- UpDownEvent.cs
- SecureStringHasher.cs
- OleDbWrapper.cs
- CommandConverter.cs
- RightsManagementManager.cs