Dim canvas1 As Canvas
Dim bmp As Bitmap
bmp.InitializeMutable(1dip,1dip)
'Dim cvs As Canvas
canvas1.Initialize2(bmp)
Dim ws As Float=canvas1.MeasureStringWidth(nr,Typeface.DEFAULT,14)
You should not use: bmp.InitializeMutable(1dip, 1dip)
because on 'old' small devices with a scale of 0.75 you will get an error because 1dip = 0.75 therfore 0.
You should use bmp.InitializeMutable(2dip, 2dip)
or bmp.InitializeMutable(1, 1) , but here you get a warning because no dip values.
or bmp.InitializeMutable(1dip,1dip) 'ignore
ignoring the warning.