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
- _ChunkParse.cs
- GAC.cs
- ButtonFieldBase.cs
- SQLChars.cs
- TypeBuilder.cs
- Asn1IntegerConverter.cs
- FrameworkElementAutomationPeer.cs
- FontNameEditor.cs
- UrlMapping.cs
- ServiceModelStringsVersion1.cs
- PriorityBindingExpression.cs
- LexicalChunk.cs
- OracleParameterCollection.cs
- Cast.cs
- ProgressBarBrushConverter.cs
- Vertex.cs
- IImplicitResourceProvider.cs
- IdnMapping.cs
- MultiView.cs
- TextEditorMouse.cs
- EventItfInfo.cs
- VectorConverter.cs
- OperandQuery.cs
- WarningException.cs
- DetailsViewCommandEventArgs.cs
- ByteAnimationBase.cs
- LineServices.cs
- EdmType.cs
- coordinator.cs
- ArgumentDirectionHelper.cs
- CodeIterationStatement.cs
- DataControlButton.cs
- basemetadatamappingvisitor.cs
- LicenseException.cs
- DuplicateWaitObjectException.cs
- BuildProviderAppliesToAttribute.cs
- XmlValueConverter.cs
- QuaternionAnimation.cs
- SiteIdentityPermission.cs
- AdapterDictionary.cs
- Cursor.cs
- DispatcherHooks.cs
- TextEditor.cs
- ProcessInputEventArgs.cs
- EncryptedType.cs
- XmlKeywords.cs
- SystemSounds.cs
- FaultImportOptions.cs
- EndpointIdentityConverter.cs
- PipeStream.cs
- ReceiveMessageRecord.cs
- IDispatchConstantAttribute.cs
- InplaceBitmapMetadataWriter.cs
- ClientScriptManager.cs
- RequestQueryParser.cs
- NullableConverter.cs
- ApplicationInterop.cs
- MessageQueuePermissionEntry.cs
- StackOverflowException.cs
- _Events.cs
- PersonalizableAttribute.cs
- QuaternionRotation3D.cs
- TargetException.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- TdsParserSafeHandles.cs
- ResourceDescriptionAttribute.cs
- FixedTextContainer.cs
- XmlMtomReader.cs
- DataGridViewMethods.cs
- HatchBrush.cs
- TrackingStringDictionary.cs
- ConnectionsZone.cs
- TextTreeDeleteContentUndoUnit.cs
- XslTransform.cs
- AsyncOperation.cs
- ThousandthOfEmRealDoubles.cs
- ErrorFormatter.cs
- ListControlActionList.cs
- XmlSchemaCollection.cs
- Documentation.cs
- XMLDiffLoader.cs
- DataPagerField.cs
- FlowDocumentView.cs
- OutputCacheProfileCollection.cs
- DataControlFieldCollection.cs
- CqlGenerator.cs
- Equal.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ToolStripOverflowButton.cs
- UncommonField.cs
- _NestedMultipleAsyncResult.cs
- httpapplicationstate.cs
- StylusPointProperty.cs
- MembershipPasswordException.cs
- TrustSection.cs
- Path.cs
- OuterGlowBitmapEffect.cs
- ConfigurationManagerHelper.cs
- CriticalHandle.cs
- RecipientInfo.cs