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
- HtmlInputText.cs
- DataGridItemCollection.cs
- TextEndOfParagraph.cs
- FolderBrowserDialog.cs
- InternalPermissions.cs
- MonthChangedEventArgs.cs
- OperationCanceledException.cs
- RowTypeElement.cs
- UpdateRecord.cs
- WebControlAdapter.cs
- DataGridRowEventArgs.cs
- FileCodeGroup.cs
- DefaultBinder.cs
- JsonServiceDocumentSerializer.cs
- XPathBinder.cs
- SerializerWriterEventHandlers.cs
- FocusManager.cs
- DataObject.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SpecularMaterial.cs
- Stackframe.cs
- MouseActionConverter.cs
- Executor.cs
- ApplicationServiceManager.cs
- ComNativeDescriptor.cs
- ProjectionRewriter.cs
- XsdBuilder.cs
- QilTernary.cs
- TextEncodedRawTextWriter.cs
- OutgoingWebRequestContext.cs
- IItemContainerGenerator.cs
- DelimitedListTraceListener.cs
- UriExt.cs
- TraceUtils.cs
- WebEvents.cs
- MulticastIPAddressInformationCollection.cs
- FileClassifier.cs
- ButtonFieldBase.cs
- WebConfigurationHost.cs
- HashCodeCombiner.cs
- BaseDataListPage.cs
- BindingFormattingDialog.cs
- HandlerBase.cs
- XmlAnyElementAttributes.cs
- PngBitmapDecoder.cs
- TdsParserStaticMethods.cs
- ScrollEventArgs.cs
- EventWaitHandleSecurity.cs
- ApplicationServiceManager.cs
- SiteMapNodeCollection.cs
- XmlSchemaElement.cs
- ActivityExecutorDelegateInfo.cs
- EncryptedKeyHashIdentifierClause.cs
- TrackingServices.cs
- ValidationRule.cs
- SuppressMessageAttribute.cs
- UserCancellationException.cs
- PropertyMapper.cs
- GridViewUpdatedEventArgs.cs
- TypeRestriction.cs
- AnnotationComponentManager.cs
- PostBackOptions.cs
- NativeMethods.cs
- DependencyPropertyKey.cs
- InternalPermissions.cs
- ToolboxItemSnapLineBehavior.cs
- Stroke.cs
- XmlIncludeAttribute.cs
- ClipboardData.cs
- RSAProtectedConfigurationProvider.cs
- HttpDigestClientCredential.cs
- SslStreamSecurityUpgradeProvider.cs
- EntityContainer.cs
- sqlnorm.cs
- RecognizedWordUnit.cs
- DbProviderFactories.cs
- SqlExpander.cs
- PersonalizationProvider.cs
- CompositeTypefaceMetrics.cs
- RegexCaptureCollection.cs
- QilSortKey.cs
- WaitForChangedResult.cs
- ProcessModuleCollection.cs
- AmbientLight.cs
- VectorAnimationBase.cs
- WebServiceParameterData.cs
- XamlRtfConverter.cs
- SchemaEntity.cs
- CodeTypeMemberCollection.cs
- DockPanel.cs
- CodeConstructor.cs
- OpCodes.cs
- DataBindingCollection.cs
- FontResourceCache.cs
- Validator.cs
- StrokeFIndices.cs
- FixedHighlight.cs
- ViewKeyConstraint.cs
- CustomActivityDesigner.cs
- Assembly.cs