I\'m trying to create canvas which resizes its children when canvas itself is resized. So I create my own class which inherits from canvas and overrides method ArrangeOverride w
This may or may not exactly fit your requirements, but whenever I hear/read 'resize', I think of the UI control that was built just for that purpose; the Viewbox
. Using this class, you have several options over how the content should be resized, but I think that you would want the default Uniform
method.
Just put whatever you need to be resized into a ViewBox
and see how you like it... it should do the job nicely and simply for you:
You don't actually need to add the Stretch="Uniform"
here because that is the default... it's just here for demonstration purposes. To find out more, please see the Viewbox Class page on MSDN.