Hi Terry,
Firstly, make sure that the Visible property of the Label is set to true
before it is bound to the custom object.
If a control is not visible before it is bound to a data source, the data
binding won't push data from the data source into the control. This is a by
design behavior.
Secondly, you need implement the INotifyPropertyChanged interface for the
custom object, so that when the values of the properties in the custom
object change, the bound control will reflect the change immediately.
The following is a sample:
using System.ComponentModel;
public class Address:INotifyPropertyChanged
{
bool visible;
public bool Visible
{
get { return visible; }
set
{
if (visible != value)
{
visible = value;
OnPropertyChanged("Visible");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new
PropertyChangedEventArgs(propertyName));
}
}
}
Please try my suggestion to see if the problem is solved and let me know
the result.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.