Select to view content in your preferred language

Toolkit - Positioning toolbar items vertically

998
5
05-06-2010 10:52 AM
MattNicol
Regular Contributor
Using the Toolbar control from the ESRI Toolkit, is it possible to have toolbar items positioned vertically?

Hopefully I'm just missing something obvious!
Reference link: http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#ToolBarWidget
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
You have to edit the template :

Open the project in Blend, rightclick the Toolbar and select to edit a copy of the template.
Select the stackpanel called 'RootElement'.
Change the orientation from Horizontal to Vertical.

/Dominique
0 Kudos
dotMorten_esri
Esri Notable Contributor
Instead of using the toolbar, why not just put some buttons in a stackpanel? (that's essentially what a toolbar is). That way you get full control, and you are not locked into a toolbar.
0 Kudos
SrisheelaDevabhaktuni
New Contributor
Instead of using the toolbar, why not just put some buttons in a stackpanel? (that's essentially what a toolbar is). That way you get full control, and you are not locked into a toolbar.


It would be very helpful if you or someone post a sample on how to implement this?

Thanks in advance
0 Kudos
MeghanHarley
New Contributor
agreed I did the simulation and there is this lovely vertical tool bar. But my ArcGis doesn't have this set up and I don't know what tool bar it was or how to get it!! (so frustrating)
0 Kudos
dotMorten_esri
Esri Notable Contributor

It would be very helpful if you or someone post a sample on how to implement this?

StackPanels are among the core basic UI Panels that you need to know when creating UI layouts in Silverlight and WPF (the only more important one is probably "Grid").

You should hopefully be familiar with Buttons already.

 
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10" Background="White">
    <Button Click="Tool1_Click" Content="Tool1" />
    <Button Click="Tool2_Click" Content="Tool2" />
    <Button Click="Tool3_Click" Content="Tool3" />
</StackPanel>
0 Kudos