How can I add scrolling support in the AnimatedCanvas sample

Views for WPF Forum

Posted 14 years ago by Craig - Varigence, Inc.
Version: 10.1.0522
I've been looking at the AnimatedCanvas sample in the Actipro sample browser and am wondering how scrolling support could be added. I tried various ways of wrapping the canvas in a ScrollViewer, but I've hit various exceptions.

Is there a way it can be done? Does AnimatedCanvas have any built in scrolling capability that I'm somehow missing?



Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Craig,

The AnimatedCanvas doesn't have any scrolling capability, but should work fine in a ScrollViewer. Something like the following code works fine:

<Button views:AnimatedCanvas.Left="25" views:AnimatedCanvas.Top="25" Content="TopLeft" />
<Button views:AnimatedCanvas.Right="25" views:AnimatedCanvas.Top="25" Content="TopRight" />
<Button views:AnimatedCanvas.Right="25" views:AnimatedCanvas.Bottom="25" Content="BottomRight" />
<Button views:AnimatedCanvas.Left="25" views:AnimatedCanvas.Bottom="25" Content="BottomLeft" />

If you are getting exceptions, then please put together a small sample project and email it over to our support address. Once we have that project, we can look into the issue. Make sure to remove any executables from the zip archive.

If you are trying to use the AnimatedCanvas in a ListBox, then you would have to set a MinWidth/MinHeight on it. By default, it will only take as much space as it's given, which in the case of the ListBox would be enough to fill the ListBox.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.