Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / UIPropertyMetadata.cs / 1 / 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
- JsonWriter.cs
- ToolStripSettings.cs
- CorrelationTokenInvalidatedHandler.cs
- Color.cs
- ParenthesizePropertyNameAttribute.cs
- SaveFileDialog.cs
- WebPartEditorApplyVerb.cs
- XamlSerializerUtil.cs
- SizeFConverter.cs
- ResourceWriter.cs
- OrderByQueryOptionExpression.cs
- SQLMoney.cs
- VersionedStreamOwner.cs
- DataServiceRequestOfT.cs
- NotifyCollectionChangedEventArgs.cs
- CompiledIdentityConstraint.cs
- RuleSetCollection.cs
- CheckPair.cs
- HtmlControl.cs
- ChtmlFormAdapter.cs
- MaskDescriptors.cs
- Error.cs
- TextDecoration.cs
- AbsoluteQuery.cs
- EventDescriptorCollection.cs
- ConfigXmlWhitespace.cs
- MsdtcWrapper.cs
- ItemType.cs
- WebHttpDispatchOperationSelectorData.cs
- ContentOnlyMessage.cs
- RouteItem.cs
- ComplexBindingPropertiesAttribute.cs
- PkcsMisc.cs
- VarRefManager.cs
- TableLayoutSettingsTypeConverter.cs
- WebPartMovingEventArgs.cs
- New.cs
- PublisherIdentityPermission.cs
- ListBindingHelper.cs
- DerivedKeySecurityTokenStub.cs
- RegionInfo.cs
- HttpResponse.cs
- SAPICategories.cs
- PrivilegedConfigurationManager.cs
- DirectoryInfo.cs
- GridViewRowCollection.cs
- OutputCacheEntry.cs
- ParameterElement.cs
- UserMapPath.cs
- ClientConvert.cs
- MethodExpr.cs
- SessionStateItemCollection.cs
- ControlUtil.cs
- LineServicesRun.cs
- Dump.cs
- WinInetCache.cs
- AlternateViewCollection.cs
- SelectedDatesCollection.cs
- ConstraintCollection.cs
- Utility.cs
- XPathDocument.cs
- FrameworkElement.cs
- PixelShader.cs
- BCLDebug.cs
- Script.cs
- BindingWorker.cs
- TdsParserStaticMethods.cs
- WinEventWrap.cs
- Stack.cs
- UnhandledExceptionEventArgs.cs
- WmlControlAdapter.cs
- XhtmlBasicLinkAdapter.cs
- AnonymousIdentificationSection.cs
- ToolBarButtonDesigner.cs
- DragSelectionMessageFilter.cs
- WindowInteractionStateTracker.cs
- DrawListViewColumnHeaderEventArgs.cs
- ConsumerConnectionPoint.cs
- TreeViewDataItemAutomationPeer.cs
- Hashtable.cs
- RC2.cs
- WindowsSecurityTokenAuthenticator.cs
- ResourcesBuildProvider.cs
- ArrayWithOffset.cs
- XmlQueryStaticData.cs
- XomlCompilerParameters.cs
- BitArray.cs
- AnimatedTypeHelpers.cs
- DataRecord.cs
- IdentityElement.cs
- Decimal.cs
- RelationshipConverter.cs
- BrowserDefinition.cs
- AppSettingsReader.cs
- CompressEmulationStream.cs
- TypeResolver.cs
- listitem.cs
- TrustLevelCollection.cs
- LinqDataSourceDeleteEventArgs.cs
- DllNotFoundException.cs