forked from microsoft/microsoft-ui-xaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCornerRadiusToThicknessConverter.properties.cpp
80 lines (69 loc) · 3.01 KB
/
CornerRadiusToThicknessConverter.properties.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "CornerRadiusToThicknessConverter.h"
namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
CppWinRTActivatableClassWithDPFactory(CornerRadiusToThicknessConverter)
}
#include "CornerRadiusToThicknessConverter.g.cpp"
GlobalDependencyProperty CornerRadiusToThicknessConverterProperties::s_ConversionKindProperty{ nullptr };
GlobalDependencyProperty CornerRadiusToThicknessConverterProperties::s_MultiplierProperty{ nullptr };
CornerRadiusToThicknessConverterProperties::CornerRadiusToThicknessConverterProperties()
{
EnsureProperties();
}
void CornerRadiusToThicknessConverterProperties::EnsureProperties()
{
if (!s_ConversionKindProperty)
{
s_ConversionKindProperty =
InitializeDependencyProperty(
L"ConversionKind",
winrt::name_of<winrt::CornerRadiusToThicknessConverterKind>(),
winrt::name_of<winrt::CornerRadiusToThicknessConverter>(),
false /* isAttached */,
ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::BoxValueIfNecessary(winrt::CornerRadiusToThicknessConverterKind::FilterLeftAndRightFromTop),
nullptr);
}
if (!s_MultiplierProperty)
{
s_MultiplierProperty =
InitializeDependencyProperty(
L"Multiplier",
winrt::name_of<double>(),
winrt::name_of<winrt::CornerRadiusToThicknessConverter>(),
false /* isAttached */,
ValueHelper<double>::BoxValueIfNecessary(1.0f),
nullptr);
}
}
void CornerRadiusToThicknessConverterProperties::ClearProperties()
{
s_ConversionKindProperty = nullptr;
s_MultiplierProperty = nullptr;
}
void CornerRadiusToThicknessConverterProperties::ConversionKind(winrt::CornerRadiusToThicknessConverterKind const& value)
{
[[gsl::suppress(con)]]
{
static_cast<CornerRadiusToThicknessConverter*>(this)->SetValue(s_ConversionKindProperty, ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::BoxValueIfNecessary(value));
}
}
winrt::CornerRadiusToThicknessConverterKind CornerRadiusToThicknessConverterProperties::ConversionKind()
{
return ValueHelper<winrt::CornerRadiusToThicknessConverterKind>::CastOrUnbox(static_cast<CornerRadiusToThicknessConverter*>(this)->GetValue(s_ConversionKindProperty));
}
void CornerRadiusToThicknessConverterProperties::Multiplier(double value)
{
[[gsl::suppress(con)]]
{
static_cast<CornerRadiusToThicknessConverter*>(this)->SetValue(s_MultiplierProperty, ValueHelper<double>::BoxValueIfNecessary(value));
}
}
double CornerRadiusToThicknessConverterProperties::Multiplier()
{
return ValueHelper<double>::CastOrUnbox(static_cast<CornerRadiusToThicknessConverter*>(this)->GetValue(s_MultiplierProperty));
}