开发者

Resize control on Main Form resize (WPF, C#)

I created a user control which is a Grid of TextBlocks with fixed height rows and fixed width each. I place this control on a main form. Then on the run time I read current height of the control and based on this value I calculate number of rows to display. Now, the problem is, when I resize main form: how can I update number of rows b开发者_如何学JAVAased on the new height of the main form?

edit: saying Grid of textblocks I meant a grid layout of texblocks


Add a handler to the Window.SizeChanged event and re-size your Grid there

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜