Updating positions in control

Jun 14, 2009 at 8:34 AM

Hi

I have made my own child of VEShape and I want to change its look each time a new frame is painted. I tought that the place to do it was the VEShape.UpdatePosistion by this method is only invoked to elemets of type VEPushPin instead of VEShape. Why?

The actual code:<font size="2" color="#0000ff"><font size="2" color="#0000ff">

private

</font></font><font size="2" color="#0000ff">

 

</font>

void RaiseViewChanged(){<font size="2">

 

</font>

 

foreach (object o in this.Items)
{
    if (o is VEPushPin)
    {<font size="2">

 

</font>

 

       VEPushPin pin = o as VEPushPin;<font size="2">

       pin.UpdatePosition(

</font>

this);

     }
}
//More code

}

The proposal:

privatevoid RaiseViewChanged(){<font size="2">

 

</font>

 

foreach (object o in this.Items)
{
    if (o is VEShape)
    { <font size="2">

 

</font>

 

       VEShape pin = o as VEShape; <font size="2">

       pin.UpdatePosition(

</font>

this);

     }
}
//More code

Huge thanks

Coordinator
Jun 14, 2009 at 9:39 PM

You're correct, that should use VEShape instead of VEPushPin.  Will include this in next update, thanks.

Coordinator
Jun 14, 2009 at 9:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.