Possible Duplicate:
Bind to a method in WPF?
How do i go about doing method binding in xaml?
I create a method to return a string and this returned string will be show on a datagrid column.
Possible Duplicate:
Bind to a method in WPF?
How do i go about doing method binding in xaml?
I create a method to return a string and this returned string will be show on a datagrid column.
As the others mentioned, and your interest in concatenating the 3 "B" elements, create a property and return something like
public string YourMultiPartString
{
get { return FirstB.Whatever + SecondB.Whatever + ThirdB.Whatever; }
}
and set your binding to this "YourMultiPartString" property.
If your "B" object has some other internal function that does OTHER actions to get the string, just change to reflect that... such as
public string YourMultiPartString
{
get { return FirstB.SomeMethod() + SecondB.SomeMethod() + ThirdB.SomeMethod(); }
}
Well if you ask me i would have a property containing that value and change the property when you call the method, this way you would resolve your problem..