I need some help. My btn2 and Listbox are null and I have no idea what went wrong.
xaml:
YAxisTitle="Pressure (mmHg)"
SecondaryYAxisTitle="Pulse Rate (beats/min)"
DockPanel.Dock="Top"/>
.....
and both BlockOne and BlockTwo are DependancyProperties:
public static DependencyProperty BlockOneProperties = DependencyProperty.Register("BlockOne", typeof(List
public static DependencyProperty BlockTwoProperties = DependencyProperty.Register("BlockTwo", typeof(List
public List
{
get { return (List
set { SetValue(BlockOneProperties, value); }
}
.....
and
BPClass have the following declaration:
public class BPData : DependencyObject
{
#region Public Property
#region DateTimeProperty
public static DependencyProperty DateTimeProperty =
DependencyProperty.Register("DateTime", typeof(DateTime), typeof(BPData));
public DateTime DateTime {
get { return (DateTime)GetValue(DateTimeProperty) ; }
set { SetValue(DateTimeProperty, value); }
}
#endregion
#region SystolicProperty
public static DependencyProperty SystolicProperty =
DependencyProperty.Register("Systolic", typeof(int), typeof(BPData));
public int Systolic {
get { return (Int32)GetValue(SystolicProperty); }
set { SetValue(SystolicProperty, value); }
}
#endregion
......
I am now stuck in a strange problem.
When I click on btn1, the Click action is triggered and the PlotChart method is called, a the listbox will be populated with the data.
but when I clicked on btn2, nothing happened, why isn't the btn2_Click triggered (cos it null?? but why is it null when btn1 is worknig ) ?
Another issue is my BlockTwoDataTable is null in the PlotChart() method, whlist BlockOneDataTable is correctly reference to as a ListBox. Where did i go wrong?
I do a watch on this and was very shock to find the my btn2 and DataTableTwo is null.
:(
Thanks and Best Regards,
Zuff
Replies
Know the answer? Post it — somebody with the same question will find it here.