Closed brucebob closed 9 years ago
I'm not sure why you want to query for IReference. You can get the property value as follows:
text.RegisterPropertyChangedCallback(text.TextProperty(), [](DependencyObject const & d, DependencyProperty const & p)
{
using namespace Windows::Foundation;
IPropertyValue value = d.GetValue(p).As<IPropertyValue>();
MODERN_TRACE(L"> %ls\n", value.GetString().Buffer());
});
I figured I was using it wrong. Thank you for the correction. Your trace function is very handy I've been using it since I've seen all of your pluralsight courses. Keep it up!
Thanks!
When trying to register a call back for a property change on a Text/Modern::String, I'm unable to get the value of the string. when I ran it to see the runtime class I got "Windows::Foundation::IReference'1"
The line with text_ref is giving me the compile error. 'Modern::ABI::Windows::Foundation::IReferenceModern::String': no GUID has been associated with this object