How can I convert a string length to a pixel unit?

前端 未结 5 527
时光取名叫无心
时光取名叫无心 2020-11-30 04:17

I have a string like this:

string s = \"This is my string\";

I am creating a Telerik report and I need to define a textbox tha

5条回答
  •  广开言路
    2020-11-30 04:31

    You can create an instance of a graphics object an use the MeasureString() method. But you will need to pass it the font name, font size, and other info.

提交回复
热议问题