0
Calling overridable method in the constructor ?
This discussion was imported from CodePlex
SagarDabas wrote at 2013-03-31 08:05:
I am doing little changes in QuadVisual3D by overriding Tessellate. AreaChart is the subclass of QuadVisual3D.
It looks like Tessellate method is invoked in the constructor of MeshElement3D class.
Can you please suggest what should I do ?
public static readonly DependencyProperty PointsProperty =
DependencyProperty.Register("PointsList", typeof(Point3DCollection),
typeof(AreaChart), new UIPropertyMetadata(null,
GeometryChanged));
public Point3DCollection PointsList
{
get
{ return (Point3DCollection)this.GetValue(PointsProperty); }
set
{ this.SetValue(PointsProperty, value); }
}
I am not able to instantiate PointsList property using this code :<local:AreaChart PointsList="0,0,8 0,-10,11" Extrusion="2" />
I am getting Count as 0 (or null Exception if I don't give a default value in the PropertyMetadata).It looks like Tessellate method is invoked in the constructor of MeshElement3D class.
Can you please suggest what should I do ?
SagarDabas wrote at 2013-03-31 09:35:
Ok, Got it. I used a temporary list to do the changes rather than directly modifying the property.
And initialized property with default values which is changed when the AreaChart constructor is invoked or it's fields are initialized.
Thanks for the awesome library.
And initialized property with default values which is changed when the AreaChart constructor is invoked or it's fields are initialized.
Thanks for the awesome library.
Customer support service by UserEcho