ScrollBars styling and few more questions

Hello,

I've just started using GoXam diagram control for Silverlight (4).
I have few question. Would appreciate any pointers.
1) Is it possible to apply custom styling for diagram control?
2) Is there a function that I can call to Fit all nodes in the current view? I'm using TreeLayout.
3) I tried using CommandHandler to assign commands to buttons on my page (increase/decrease zoom) but nothing happens when I click on them. I used following binding:
Zoom In
4) As I understand it's not possible to use TemplateDictionaries in SL. What is the best way to assign different node templates ?
Many thanks, Alex
  1. Yes, you can set the Diagram.Template with a customized ControlTemplate. The GoXamIntro document describes this. You can find the definition of the standard ControlTemplate in the GenericSilverlight.xaml file that is in the docs subdirectory of the installation.

  2. Normally one would just set Diagram.Stretch=“Uniform”. This will cause the view to be rescaled after each layout.

If you don’t want the view to be rescaled after each layout, you can do it just after the very first layout by setting Diagram.InitialStretch instead.

  1. CommandHandler.IncreaseZoom is a method. You need to assign the Button.Command property to something of type ICommand. That would be the value of CommandHandler.IncreaseZoomCommand:
    Path=CommandHandler.IncreaseZoomCommand

  2. Yes, you can use DataTemplateDictionary in Silverlight. It’s just that Silverlight 3 didn’t support doing so in XAML – you had to initialize it in code.

But I think you can do so in Silverlight 4 XAML. (Or continue using code, as the samples do.)

Thanks a lot for the quick response!