I've put together a WPF application using ObservableCollection and Dependency Properties which is cool because I just have to add an item to the Observable Collection and it shows up automatically, e.g. I display the objects in the collection as boxes on the screen in a wrappanel, each box showing its "Title".
So then I wanted to have each item show not only its "Title" plus a prefix or suffix, but the Dependency Object property doesn't even seem to be used. I can put a break point on it and it is never reached.
Can anyone enlighten me why, if I add text to my outgoing property, that that text is never seen? I have read that the value is actually "stored not in the object but in WPF" but I dont' understand what that means.
Why is the text this text will NOT be seen never output by the dependency object?
public class ApplicationItem : DependencyObject
{
public string Title
{
get
{
return (string)GetValue("this text will NOT be seen: " + TitleProperty);
}
set
{
SetValue(TitleProperty, "this text will be seen: " + value);
}
}