void ColorPickerProperties::EnsureProperties()

in dev/Generated/ColorPicker.properties.cpp [43:265]


void ColorPickerProperties::EnsureProperties()
{
    if (!s_ColorProperty)
    {
        s_ColorProperty =
            InitializeDependencyProperty(
                L"Color",
                winrt::name_of<winrt::Color>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<winrt::Color>::BoxValueIfNecessary({ 255, 255, 255, 255 }),
                winrt::PropertyChangedCallback(&OnColorPropertyChanged));
    }
    if (!s_ColorSpectrumComponentsProperty)
    {
        s_ColorSpectrumComponentsProperty =
            InitializeDependencyProperty(
                L"ColorSpectrumComponents",
                winrt::name_of<winrt::ColorSpectrumComponents>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<winrt::ColorSpectrumComponents>::BoxValueIfNecessary(winrt::ColorSpectrumComponents::HueSaturation),
                winrt::PropertyChangedCallback(&OnColorSpectrumComponentsPropertyChanged));
    }
    if (!s_ColorSpectrumShapeProperty)
    {
        s_ColorSpectrumShapeProperty =
            InitializeDependencyProperty(
                L"ColorSpectrumShape",
                winrt::name_of<winrt::ColorSpectrumShape>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<winrt::ColorSpectrumShape>::BoxValueIfNecessary(winrt::ColorSpectrumShape::Box),
                winrt::PropertyChangedCallback(&OnColorSpectrumShapePropertyChanged));
    }
    if (!s_IsAlphaEnabledProperty)
    {
        s_IsAlphaEnabledProperty =
            InitializeDependencyProperty(
                L"IsAlphaEnabled",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsAlphaEnabledPropertyChanged));
    }
    if (!s_IsAlphaSliderVisibleProperty)
    {
        s_IsAlphaSliderVisibleProperty =
            InitializeDependencyProperty(
                L"IsAlphaSliderVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsAlphaSliderVisiblePropertyChanged));
    }
    if (!s_IsAlphaTextInputVisibleProperty)
    {
        s_IsAlphaTextInputVisibleProperty =
            InitializeDependencyProperty(
                L"IsAlphaTextInputVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsAlphaTextInputVisiblePropertyChanged));
    }
    if (!s_IsColorChannelTextInputVisibleProperty)
    {
        s_IsColorChannelTextInputVisibleProperty =
            InitializeDependencyProperty(
                L"IsColorChannelTextInputVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsColorChannelTextInputVisiblePropertyChanged));
    }
    if (!s_IsColorPreviewVisibleProperty)
    {
        s_IsColorPreviewVisibleProperty =
            InitializeDependencyProperty(
                L"IsColorPreviewVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsColorPreviewVisiblePropertyChanged));
    }
    if (!s_IsColorSliderVisibleProperty)
    {
        s_IsColorSliderVisibleProperty =
            InitializeDependencyProperty(
                L"IsColorSliderVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsColorSliderVisiblePropertyChanged));
    }
    if (!s_IsColorSpectrumVisibleProperty)
    {
        s_IsColorSpectrumVisibleProperty =
            InitializeDependencyProperty(
                L"IsColorSpectrumVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsColorSpectrumVisiblePropertyChanged));
    }
    if (!s_IsHexInputVisibleProperty)
    {
        s_IsHexInputVisibleProperty =
            InitializeDependencyProperty(
                L"IsHexInputVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxValueIfNecessary(true),
                winrt::PropertyChangedCallback(&OnIsHexInputVisiblePropertyChanged));
    }
    if (!s_IsMoreButtonVisibleProperty)
    {
        s_IsMoreButtonVisibleProperty =
            InitializeDependencyProperty(
                L"IsMoreButtonVisible",
                winrt::name_of<bool>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<bool>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnIsMoreButtonVisiblePropertyChanged));
    }
    if (!s_MaxHueProperty)
    {
        s_MaxHueProperty =
            InitializeDependencyProperty(
                L"MaxHue",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(359),
                winrt::PropertyChangedCallback(&OnMaxHuePropertyChanged));
    }
    if (!s_MaxSaturationProperty)
    {
        s_MaxSaturationProperty =
            InitializeDependencyProperty(
                L"MaxSaturation",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(100),
                winrt::PropertyChangedCallback(&OnMaxSaturationPropertyChanged));
    }
    if (!s_MaxValueProperty)
    {
        s_MaxValueProperty =
            InitializeDependencyProperty(
                L"MaxValue",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(100),
                winrt::PropertyChangedCallback(&OnMaxValuePropertyChanged));
    }
    if (!s_MinHueProperty)
    {
        s_MinHueProperty =
            InitializeDependencyProperty(
                L"MinHue",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(0),
                winrt::PropertyChangedCallback(&OnMinHuePropertyChanged));
    }
    if (!s_MinSaturationProperty)
    {
        s_MinSaturationProperty =
            InitializeDependencyProperty(
                L"MinSaturation",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(0),
                winrt::PropertyChangedCallback(&OnMinSaturationPropertyChanged));
    }
    if (!s_MinValueProperty)
    {
        s_MinValueProperty =
            InitializeDependencyProperty(
                L"MinValue",
                winrt::name_of<int>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<int>::BoxValueIfNecessary(0),
                winrt::PropertyChangedCallback(&OnMinValuePropertyChanged));
    }
    if (!s_OrientationProperty)
    {
        s_OrientationProperty =
            InitializeDependencyProperty(
                L"Orientation",
                winrt::name_of<winrt::Orientation>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<winrt::Orientation>::BoxValueIfNecessary(winrt::Orientation::Vertical),
                winrt::PropertyChangedCallback(&OnOrientationPropertyChanged));
    }
    if (!s_PreviousColorProperty)
    {
        s_PreviousColorProperty =
            InitializeDependencyProperty(
                L"PreviousColor",
                winrt::name_of<winrt::IReference<winrt::Color>>(),
                winrt::name_of<winrt::ColorPicker>(),
                false /* isAttached */,
                ValueHelper<winrt::IReference<winrt::Color>>::BoxedDefaultValue(),
                winrt::PropertyChangedCallback(&OnPreviousColorPropertyChanged));
    }
}