I have Wpf-App for working on person object. Person Struct is Sql-server table and I use Linq-to-Sql for my project(so there is class in dbml refer to person).
I have form for update or inserting persons(simple modal window). In this window I have Peoperty which have current value of person.
public Person CurrentPerson { get; set; }
So what I look for is :
How bind title of this window base on
CurrentPerson.FullName? and absolutely Window Title must change if CurrentPerson.FullName Changed!
Edit: More Info
I want to change window title base on CurrentPerson.Name not set equally same as CurrentPerson.Name. So this might be change something. Also I searched before find this and this Question about changing part of Title. but I need to change some part of Title base on value.
Firstly, your codebehind or viewmodel should implement
INotifyPropertyChanged. After that, implement a propertyWindowTitlelike this:After this, whenever your change the
FullNameon yourCurrentPerson, just throw aPropertyChangedevent, for example:EDIT: Please post your xaml code for the binding, which looking at your comment on the post of Novice, seems like the culprit. Also, check that you are setting the
Window‘sDataContextto itself.