wpf - CompositionTarget.TransformToDevice contains unexpected matrix values, but why? -
wpf - CompositionTarget.TransformToDevice contains unexpected matrix values, but why? -
i'm using pixellab's bot (bag o' tricks) reorderlistbox control, i've noticed major slowdowns on mousedown of list item.
i've tracked downwards way command creates dragpreviewadorner, getcurrentdpi method, implemented as:
matrix m = presentationsource.fromvisual(visual) .compositiontarget .transformtodevice; x = 96 / m.m11; y = 96 / m.m22; thing is, list items, m11 , m22 coming tiny numbers, thereby giving big dpi (x = 100000, , y = 5500). consequently, calling code ends creating enormous in-memory bitmap, in turn causes delay when garbage collected.
my question is: might causing these seemingly erroneous values in transform? looks fine on-screen. :-/
thanks.
wpf dpi
Comments
Post a Comment