MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / PropertyChangedBase

Class PropertyChangedBase

Xaml/PropertyChangedBase.hpp:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 DECL_PROPERTY_CHANGED_FUNCS(TYPE, NAME, PROPERTY_CHANGED_FIELD(NAME))
27
28class PropertyChangedBase {
29public:
30 DECL_EVENT(wux::Data::PropertyChangedEventHandler, PropertyChanged, m_propertyChanged);
31
32protected:
33 template<typename Self, typename U>
34 void compare_assign(this Self &&self, U &value, const U &new_value, std::wstring_view name)
35 {
36 if (value != new_value)
37 {
38 value = new_value;
39 self.m_propertyChanged(self, wux::Data::PropertyChangedEventArgs(name));
40 }
41 }
42};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected