mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Added TypeInfo for all relevant types Added comments Updated DependencyProperty to work with System::Type Fixed casing on PropertyMetadata
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/*****************************************************************************
|
|
* 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
|
|
{
|
|
/**
|
|
* Defines certain behavior aspects of a dependency property, including conditions it was registered with.
|
|
*/
|
|
template <typename T>
|
|
class PropertyMetadata
|
|
{
|
|
public:
|
|
/**
|
|
* 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.
|
|
*/
|
|
PropertyMetadata(T defaultValue);
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////
|
|
|
|
template <typename T>
|
|
PropertyMetadata<T>::PropertyMetadata(T const defaultValue)
|
|
: DefaultValue(defaultValue)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif //_SYSTEM_WINDOWS_PROPERTYMETADATA_
|