c# - How to preprocess/convert data of a databinding? -
i creating datagrid
going define (through user-input) x , y values of curve presented on same window. curve going defined path
containing series of quadraticbeziercurve
objects.
however, while user input coordinates of points path go through, quadraticbeziercurve
's data contains information regarding endpoints , control point, not point go through (other in straight line). i've done math figure out how calculate control point defined 3 coordinates curve must go through, need create curve.
is possible bind datagrid
"buffer" dataset processesed (though code-behind) , result bound quadraticbeziercurve
?
or need to, on user input, delete existing path , construct new one?
by virtue of binding itemssource
collection, each row of datagrid
bound item in collection. assuming mvvm, each item view model. view model can have properties values user enters, , changes can cause recalculation in exposes control point. part of ui can bound same property, automatically refresh.
Comments
Post a Comment