@@ -10,7 +10,7 @@ dev_langs:
10
10
- csharp
11
11
- vb
12
12
- cppwinrt
13
- - cpp
13
+ - cppcx
14
14
---
15
15
# Custom dependency properties
16
16
@@ -120,7 +120,7 @@ Windows::UI::Xaml::DependencyProperty ImageWithLabelControl::m_labelProperty =
120
120
...
121
121
```
122
122
123
- ``` cpp
123
+ ``` cppcx
124
124
//.h file
125
125
//using namespace Windows::UI::Xaml::Controls;
126
126
//using namespace Windows::UI::Xaml::Interop;
@@ -212,7 +212,7 @@ void Label(winrt::hstring const& value)
212
212
...
213
213
```
214
214
215
- ``` cpp
215
+ ``` cppcx
216
216
//using namespace Platform;
217
217
public:
218
218
...
@@ -276,7 +276,7 @@ Windows::UI::Xaml::DependencyProperty ImageWithLabelControl::m_labelProperty =
276
276
...
277
277
```
278
278
279
- ``` cpp
279
+ ``` cppcx
280
280
DependencyProperty^ ImageWithLabelControl::_LabelProperty =
281
281
DependencyProperty::Register("Label",
282
282
Platform::String::typeid,
@@ -356,7 +356,7 @@ void ImageWithLabelControl::OnLabelChanged(Windows::UI::Xaml::DependencyObject c
356
356
}
357
357
```
358
358
359
- ``` cpp
359
+ ``` cppcx
360
360
static void OnLabelChanged(DependencyObject^ d, DependencyPropertyChangedEventArgs^ e)
361
361
{
362
362
ImageWithLabelControl^ iwlc = (ImageWithLabelControl^)d;
@@ -403,7 +403,7 @@ static void OnVisibilityValueChanged(Windows::UI::Xaml::DependencyObject const&
403
403
}
404
404
```
405
405
406
- ``` cpp
406
+ ``` cppcx
407
407
static void OnVisibilityValueChanged(DependencyObject^ d, DependencyPropertyChangedEventArgs^ e)
408
408
{
409
409
if ((Visibility)e->NewValue != (Visibility)e->OldValue)
@@ -474,4 +474,4 @@ The implementation for registering a property in C++/CX is trickier than C#, bot
474
474
- [ ** DependencyProperty.Register** ] ( /uwp/api/windows.ui.xaml.dependencyproperty.register )
475
475
- [ Dependency properties overview] ( dependency-properties-overview.md )
476
476
- [ XAML user and custom controls sample] ( https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/Official%20Windows%20Platform%20Sample/XAML%20user%20and%20custom%20controls%20sample )
477
-
477
+
0 commit comments