Took me a second but I think I know what's going on here. The
Source
should be set to the object (or parent) which contains the property you wish to access while the
Path
is the path to that property from the source. Try
new Binding
{
Source = this,
Path = new PropertyPath ( "PortSettings" ) ,
Converter = new ColorTemplateSelector ( ) ,
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged ,
Mode = BindingMode.TwoWay
}
EDIT: Note: If you want to access a property of
PortSettings
like
CActual
you need to cast the property or set the type of property to the proper type instead of
object
. Then just change the
Path
to
new PropertyPath("PortSettings.CActual")
.