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
- UniqueEventHelper.cs
- ElapsedEventArgs.cs
- PropertyDescriptor.cs
- StyleXamlParser.cs
- XmlSiteMapProvider.cs
- ResourcePool.cs
- ContainerActivationHelper.cs
- FaultDescriptionCollection.cs
- XhtmlTextWriter.cs
- FileDialog.cs
- PersonalizationStateInfoCollection.cs
- FontFamily.cs
- Walker.cs
- ValidationErrorEventArgs.cs
- QuerySetOp.cs
- DragDeltaEventArgs.cs
- InvalidComObjectException.cs
- BitVector32.cs
- MediaContextNotificationWindow.cs
- XmlSerializableReader.cs
- ColumnMapVisitor.cs
- SerializableAttribute.cs
- ToolStripItemClickedEventArgs.cs
- HitTestParameters.cs
- TypefaceMetricsCache.cs
- TextStore.cs
- AutomationProperty.cs
- NameTable.cs
- SymmetricSecurityBindingElement.cs
- safelinkcollection.cs
- XmlCollation.cs
- FileInfo.cs
- Compiler.cs
- Geometry3D.cs
- FindCriteriaElement.cs
- SaveLedgerEntryRequest.cs
- InvalidDataException.cs
- TextRenderer.cs
- FormsAuthenticationTicket.cs
- ButtonChrome.cs
- AssertHelper.cs
- QilInvokeEarlyBound.cs
- TimeoutValidationAttribute.cs
- TraceData.cs
- Scripts.cs
- PolicyLevel.cs
- WebPartRestoreVerb.cs
- BaseDataList.cs
- ProtectedConfiguration.cs
- AesManaged.cs
- WebPartConnectionsEventArgs.cs
- ZipIOExtraFieldPaddingElement.cs
- StructuredProperty.cs
- Zone.cs
- FormsAuthentication.cs
- ShapingEngine.cs
- Pair.cs
- SourceFileInfo.cs
- SqlClientPermission.cs
- PagedControl.cs
- DBConnection.cs
- ResourceProviderFactory.cs
- FileDataSource.cs
- LambdaSerializationException.cs
- HttpAsyncResult.cs
- XmlToDatasetMap.cs
- StringSource.cs
- LoadGrammarCompletedEventArgs.cs
- SQLDoubleStorage.cs
- DllHostedComPlusServiceHost.cs
- KeyValueConfigurationElement.cs
- ProtocolsConfigurationEntry.cs
- OdbcConnection.cs
- ResourceReferenceExpression.cs
- WebPartConnectionsEventArgs.cs
- SerializeAbsoluteContext.cs
- ResolvedKeyFrameEntry.cs
- XmlNamespaceMapping.cs
- RepeaterItem.cs
- HttpCacheVaryByContentEncodings.cs
- AuthorizationSection.cs
- StringBuilder.cs
- CompositionTarget.cs
- SafeBitVector32.cs
- MetadataItemCollectionFactory.cs
- FilteredDataSetHelper.cs
- _ListenerAsyncResult.cs
- DiagnosticsConfigurationHandler.cs
- AssemblyBuilder.cs
- XmlSchemaGroup.cs
- QueryResults.cs
- loginstatus.cs
- ExpressionConverter.cs
- CacheEntry.cs
- InplaceBitmapMetadataWriter.cs
- odbcmetadatacollectionnames.cs
- TextEncodedRawTextWriter.cs
- DataView.cs
- XPSSignatureDefinition.cs
- AppDomainResourcePerfCounters.cs