Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / UIPropertyMetadata.cs / 1305600 / UIPropertyMetadata.cs
using MS.Utility; using System; using System.Collections.Generic; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { ////// Metadata for supported UI features /// public class UIPropertyMetadata : PropertyMetadata { ////// UI metadata construction /// public UIPropertyMetadata() : base() { } ////// UI metadata construction /// /// Default value of property public UIPropertyMetadata(object defaultValue) : base(defaultValue) { } ////// UI metadata construction /// /// Called when the property has been changed public UIPropertyMetadata(PropertyChangedCallback propertyChangedCallback) : base(propertyChangedCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback) : base(defaultValue, propertyChangedCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed /// Called on update of value public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback) : base(defaultValue, propertyChangedCallback, coerceValueCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed /// Called on update of value /// Should animation be prohibited? public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback, bool isAnimationProhibited) : base(defaultValue, propertyChangedCallback, coerceValueCallback) { WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, isAnimationProhibited); } ////// Creates a new instance of this property metadata. This method is used /// when metadata needs to be cloned. After CreateInstance is called the /// framework will call Merge to merge metadata into the new instance. /// Deriving classes must override this and return a new instance of /// themselves. /// internal override PropertyMetadata CreateInstance() { return new UIPropertyMetadata(); } ////// Set this to true for a property for which animation should be /// prohibited. This should not be set unless there are very strong /// technical reasons why a property can not be animated. In the /// vast majority of cases, a property that can not be properly /// animated means that the property implementation contains a bug. /// public bool IsAnimationProhibited { get { return ReadFlag(MetadataFlags.UI_IsAnimationProhibitedID); } set { if (Sealed) { throw new InvalidOperationException(SR.Get(SRID.TypeMetadataCannotChangeAfterUse)); } WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using MS.Utility; using System; using System.Collections.Generic; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { ////// Metadata for supported UI features /// public class UIPropertyMetadata : PropertyMetadata { ////// UI metadata construction /// public UIPropertyMetadata() : base() { } ////// UI metadata construction /// /// Default value of property public UIPropertyMetadata(object defaultValue) : base(defaultValue) { } ////// UI metadata construction /// /// Called when the property has been changed public UIPropertyMetadata(PropertyChangedCallback propertyChangedCallback) : base(propertyChangedCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback) : base(defaultValue, propertyChangedCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed /// Called on update of value public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback) : base(defaultValue, propertyChangedCallback, coerceValueCallback) { } ////// UI metadata construction /// /// Default value of property /// Called when the property has been changed /// Called on update of value /// Should animation be prohibited? public UIPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback, bool isAnimationProhibited) : base(defaultValue, propertyChangedCallback, coerceValueCallback) { WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, isAnimationProhibited); } ////// Creates a new instance of this property metadata. This method is used /// when metadata needs to be cloned. After CreateInstance is called the /// framework will call Merge to merge metadata into the new instance. /// Deriving classes must override this and return a new instance of /// themselves. /// internal override PropertyMetadata CreateInstance() { return new UIPropertyMetadata(); } ////// Set this to true for a property for which animation should be /// prohibited. This should not be set unless there are very strong /// technical reasons why a property can not be animated. In the /// vast majority of cases, a property that can not be properly /// animated means that the property implementation contains a bug. /// public bool IsAnimationProhibited { get { return ReadFlag(MetadataFlags.UI_IsAnimationProhibitedID); } set { if (Sealed) { throw new InvalidOperationException(SR.Get(SRID.TypeMetadataCannotChangeAfterUse)); } WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, value); } } } } // 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
- TraceInternal.cs
- TableColumn.cs
- MatrixValueSerializer.cs
- MultiSelectRootGridEntry.cs
- CqlLexer.cs
- OuterGlowBitmapEffect.cs
- DocumentManager.cs
- sqlcontext.cs
- sqlmetadatafactory.cs
- SimpleTextLine.cs
- CodeBinaryOperatorExpression.cs
- MultipleViewProviderWrapper.cs
- ParentQuery.cs
- ItemType.cs
- StreamedWorkflowDefinitionContext.cs
- ReturnEventArgs.cs
- FileDialogPermission.cs
- FolderBrowserDialogDesigner.cs
- RtType.cs
- UrlRoutingHandler.cs
- TypeDescriptor.cs
- DbConnectionStringCommon.cs
- VScrollProperties.cs
- NavigationFailedEventArgs.cs
- QueryContinueDragEvent.cs
- DropAnimation.xaml.cs
- Descriptor.cs
- HttpStreams.cs
- HttpCapabilitiesBase.cs
- PrimarySelectionGlyph.cs
- FunctionImportMapping.cs
- Localizer.cs
- StoreAnnotationsMap.cs
- FontFamily.cs
- EnvelopeVersion.cs
- InputBindingCollection.cs
- PreviewPrintController.cs
- CellIdBoolean.cs
- DrawingImage.cs
- NavigationWindowAutomationPeer.cs
- ExceptionHelpers.cs
- XmlAttributeCache.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- InputChannelBinder.cs
- RootProfilePropertySettingsCollection.cs
- BoundingRectTracker.cs
- Executor.cs
- AdditionalEntityFunctions.cs
- TextDecoration.cs
- SqlConnectionManager.cs
- FixedDSBuilder.cs
- Action.cs
- ChooseAction.cs
- CultureInfo.cs
- SqlNodeTypeOperators.cs
- EntitySetBaseCollection.cs
- ValueProviderWrapper.cs
- TextElementEnumerator.cs
- WebCategoryAttribute.cs
- DeflateStream.cs
- DataReaderContainer.cs
- ContextStack.cs
- MetadataItemEmitter.cs
- ObjectCacheSettings.cs
- SerializationStore.cs
- FileFormatException.cs
- ThemeDirectoryCompiler.cs
- TextChangedEventArgs.cs
- DataObject.cs
- TextTreeFixupNode.cs
- ObjectItemConventionAssemblyLoader.cs
- DataGridViewCellLinkedList.cs
- SqlConnectionHelper.cs
- SpeechSeg.cs
- SvcMapFileLoader.cs
- NativeCppClassAttribute.cs
- EventHandlersStore.cs
- ConfigurationValue.cs
- RuleProcessor.cs
- TextControl.cs
- SqlProcedureAttribute.cs
- Rect3D.cs
- XPathNodePointer.cs
- RotationValidation.cs
- FrugalList.cs
- FixedTextSelectionProcessor.cs
- ExtractorMetadata.cs
- CanonicalFontFamilyReference.cs
- WebPartEditorCancelVerb.cs
- UnsafeCollabNativeMethods.cs
- DeferredSelectedIndexReference.cs
- NativeRightsManagementAPIsStructures.cs
- JoinTreeSlot.cs
- SectionXmlInfo.cs
- WorkflowViewService.cs
- FragmentNavigationEventArgs.cs
- ControllableStoryboardAction.cs
- CurrencyWrapper.cs
- EventDescriptor.cs