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
精彩评论