2013-06-12 19:21:00 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* PropertyMetaData.h *
|
|
|
|
* *
|
|
|
|
* System::Windows::PropertyMetaData definition file *
|
|
|
|
* Copyright (c) XFX Team. All rights reserved *
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef _SYSTEM_WINDOWS_PROPERTYMETADATA_
|
|
|
|
#define _SYSTEM_WINDOWS_PROPERTYMETADATA_
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
namespace Windows
|
|
|
|
{
|
2013-07-11 17:25:49 +02:00
|
|
|
/**
|
|
|
|
* Defines certain behavior aspects of a dependency property, including conditions it was registered with.
|
|
|
|
*/
|
2013-06-12 19:21:00 +02:00
|
|
|
template <typename T>
|
2013-07-12 21:30:13 +02:00
|
|
|
class PropertyMetadata
|
2013-06-12 19:21:00 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-07-11 17:25:49 +02:00
|
|
|
/**
|
|
|
|
* Gets the default value for the dependency property.
|
|
|
|
*/
|
|
|
|
T const DefaultValue;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a new instance of the PropertyMetaData class using a property default value.
|
|
|
|
*
|
|
|
|
* @param defaultValue
|
|
|
|
* A default value for the property where this System::Windows::PropertyMetadata is applied.
|
|
|
|
*/
|
2013-07-12 21:30:13 +02:00
|
|
|
PropertyMetadata(T defaultValue);
|
2013-06-12 19:21:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
template <typename T>
|
2013-07-12 21:30:13 +02:00
|
|
|
PropertyMetadata<T>::PropertyMetadata(T const defaultValue)
|
2013-07-11 17:25:49 +02:00
|
|
|
: DefaultValue(defaultValue)
|
2013-06-12 19:21:00 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_SYSTEM_WINDOWS_PROPERTYMETADATA_
|