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
- BinaryMessageFormatter.cs
- PackageStore.cs
- WmfPlaceableFileHeader.cs
- WmlLinkAdapter.cs
- Variable.cs
- SafeProcessHandle.cs
- UnhandledExceptionEventArgs.cs
- Parser.cs
- SizeValueSerializer.cs
- LineProperties.cs
- CombinedGeometry.cs
- Module.cs
- SubstitutionList.cs
- SelectionListComponentEditor.cs
- TreeNodeStyle.cs
- ResXDataNode.cs
- Stacktrace.cs
- WindowsGraphics2.cs
- PeerObject.cs
- DisplayNameAttribute.cs
- StorageRoot.cs
- ElementMarkupObject.cs
- TypeDependencyAttribute.cs
- DispatchOperation.cs
- TextRunProperties.cs
- PolyQuadraticBezierSegment.cs
- RenameRuleObjectDialog.cs
- XmlDataLoader.cs
- EnumUnknown.cs
- VisualBasicSettingsHandler.cs
- MarshalByValueComponent.cs
- selecteditemcollection.cs
- CryptographicAttribute.cs
- ProtocolsConfigurationEntry.cs
- SaveFileDialog.cs
- ArgIterator.cs
- PerformanceCounterPermissionEntry.cs
- OleDbEnumerator.cs
- CachedPathData.cs
- WebPartEditorCancelVerb.cs
- EdmValidator.cs
- Int16Converter.cs
- XsdBuilder.cs
- SByteConverter.cs
- FormParameter.cs
- XmlSortKey.cs
- ScriptHandlerFactory.cs
- XmlTextWriter.cs
- WorkflowDurableInstance.cs
- CachedRequestParams.cs
- CompoundFileReference.cs
- HyperLink.cs
- MemberBinding.cs
- FloaterBaseParagraph.cs
- SqlUserDefinedAggregateAttribute.cs
- ProjectionPathSegment.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ValidationHelpers.cs
- XamlSerializer.cs
- NativeMethodsCLR.cs
- UpdateException.cs
- StylusPoint.cs
- CodeTypeDeclarationCollection.cs
- ListControl.cs
- DataGridViewColumnConverter.cs
- NativeMethods.cs
- WebEventTraceProvider.cs
- PipelineModuleStepContainer.cs
- BaseTemplateBuildProvider.cs
- CodeGroup.cs
- FormatSettings.cs
- LexicalChunk.cs
- MailSettingsSection.cs
- UnknownBitmapEncoder.cs
- ParameterCollection.cs
- CodeAttributeArgumentCollection.cs
- DivideByZeroException.cs
- UserMapPath.cs
- ContainerFilterService.cs
- _DomainName.cs
- ToolStripComboBox.cs
- PtsHelper.cs
- As.cs
- SHA512.cs
- Brush.cs
- ExpressionBuilderContext.cs
- IPGlobalProperties.cs
- ProxyHwnd.cs
- FontStyle.cs
- SafePointer.cs
- JournalEntryStack.cs
- ScrollChrome.cs
- WSMessageEncoding.cs
- WebCategoryAttribute.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- XmlBinaryReaderSession.cs
- ListBox.cs
- SchemaElementDecl.cs
- CodeIdentifier.cs
- PropertyConverter.cs