[UWP/WPF/C++/CX] There are two properties with different names. Why?

Asked 1 years ago, Updated 1 years ago, 81 views

I'm practicing to create a UWP app with C++/CX.

Every time I look at an object browser, if there is one property, there is a similar property with the same name behind it, what is this?

Each detailed description goes like this.

CanGoBack

public : property bool CanGoBack { get; }
    Member of Windows::UI::Xaml::Controls::Frame

CanGoBackProperty

public : static property Windows::UI::Xaml::DependencyProperty^ CanGoBackProperty { get; }
    Member of Windows::UI::Xaml::Controls::Frame

uwp universal-windows-platform wpf c++/cx

2022-09-22 12:55

1 Answers

All attributes that are followed by Property such as CanGoBackProperty are a kind of DependencyProperty. These properties are related to .NET's medium-attribute property system, which can be used to create bindings or to create events when properties change.

Read Document on MSDN's medium attribute.


2022-09-22 12:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.