Dynamic size canvas with Scroll bars

Posted by Pawan on Stack Overflow See other posts from Stack Overflow or by Pawan
Published on 2010-04-19T22:16:34Z Indexed on 2010/04/19 22:53 UTC
Read the original article Hit count: 384

Filed under:
|
|

Hi, I am developing a simple WPF application without any auto layout. The goal is when a user clicks (mouse down) a element (say textBlock) will appear at the location of the mouse click. For this I am using canvas panel embedded in a Grid of 1 row, 1 column and scrollviewer (visible). The issues are: 1. when the application window is resized the scroll viewers do not become active. 2. I want the ability to auto grow the canvas with mouse drag. Something like in MS-Excel when user drags the mouse horizontally/vertically the canvas should grow.

I have searched net a lot to figure this out and am unable to get an answer. Any help in this regard would be great. Thanks a bunch in advance.

-P

© Stack Overflow or respective owner

Related posts about wpf

Related posts about canvas