DiagramingDemoResize.png

CanvasResizeEventProcessor allow resize one item by adjusting it's Height and Width property.

How to use?

View
CanvasResizeEventProcessor works on canvas only, the UIElement Width/Height depenency property of subItems should be bound to DataContext.Width/Height property.

e.g. MainWindow in DiagramingDemo

You have to enable the processor by using the following code:
<bc:UIEventAdapter.Processors>
    <bc:CanvasDragEventProcessor />
    <bc:MultiSelectEventProcessor EnableMultiSelect="True" 
                                UnselectAllCommand="{Binding Commands.UnselectAllCommand}" />
    <bc:CanvasResizeEventProcessor />
</bc:UIEventAdapter.Processors>


ViewModel

Your item view model should implement IResizable interface.

CanvasResizeEventProcessor only update your IResizable.Width/Height when the reisize is completed.

Implementation
Please see source.


Last edited Oct 17, 2014 at 5:15 PM by lycj, version 2

Comments

No comments yet.