<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Positioning the Esri toolkit vertically in Silverlight in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367570#M9462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To get a vertical toolbar, you can edit the template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Open the project in Blend, rightclick the Toolbar and select to edit a copy of the template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Select the stackpanel called 'RootElement'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Change the orientation from Horizontal to Vertical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]But that doesn't allow to change the orientation at runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One option is to create your own ToolbarExt class derivating from the toolbar and to add an 'Orientation' property:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Example C# code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
namespace ToolkitExt
{
public class ToolbarExt : Toolbar
{
public ToolbarExt()
{
this.DefaultStyleKey = typeof(ToolbarExt);
}
�??
public Orientation Orientation
{
get { return (Orientation)GetValue(OrientationProperty); }
set { SetValue(OrientationProperty, value); }
}
public static readonly DependencyProperty OrientationProperty =
DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ToolbarExt), new PropertyMetadata(Orientation.Horizontal));
}
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML code to put in generic.xaml file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
&amp;lt;ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkitext="clr-namespace:ToolkitExt"&amp;gt;
&amp;lt;Style TargetType="toolkitext:ToolbarExt"&amp;gt;
&amp;lt;Setter Property="ToolbarItemClickEffect" Value="Bounce" /&amp;gt;
&amp;lt;Setter Property="MaxItemHeight" Value="110" /&amp;gt;
&amp;lt;Setter Property="MaxItemWidth" Value="110" /&amp;gt;
&amp;lt;Setter Property="Template"&amp;gt;
&amp;lt;Setter.Value&amp;gt;
&amp;lt;ControlTemplate TargetType="toolkitext:ToolbarExt"&amp;gt;
&amp;lt;StackPanel x:Name="RootElement" Background="Transparent" HorizontalAlignment="Center" Orientation="{TemplateBinding Orientation}"/&amp;gt;
&amp;lt;/ControlTemplate&amp;gt;
&amp;lt;/Setter.Value&amp;gt;
&amp;lt;/Setter&amp;gt;
&amp;lt;/Style&amp;gt;
&amp;lt;/ResourceDictionary&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this class you can initialize the orientation either in XAML or by code at run time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:03:49 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2021-12-11T17:03:49Z</dc:date>
    <item>
      <title>Positioning the Esri toolkit vertically in Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367568#M9460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.... In My silverlight application I kept the EsriToolkit toolbar in a stack Panel.Initially Orientation set for the Stackpanel is Horizontal. I need to Change the Toolbar position to vertical from Horizontal... at runtime...&amp;nbsp; When MouseLeftButton Dragged down. Changing the Orientation of StackPanel to vertical and Changing the With and Height of the Toolbar in this Event is not Working. what exactly I should do for it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 05:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367568#M9460</guid>
      <dc:creator>AnurithaPathireddy</dc:creator>
      <dc:date>2010-07-08T05:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Positioning the Esri toolkit vertically in Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367569#M9461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We ran into the same issue. We ended up just making our own "Toolbar" out of a stackpanel. You'll probably have to do something similar.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 13:35:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367569#M9461</guid>
      <dc:creator>DonnieHolmes</dc:creator>
      <dc:date>2010-07-08T13:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Positioning the Esri toolkit vertically in Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367570#M9462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To get a vertical toolbar, you can edit the template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Open the project in Blend, rightclick the Toolbar and select to edit a copy of the template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Select the stackpanel called 'RootElement'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Change the orientation from Horizontal to Vertical.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]But that doesn't allow to change the orientation at runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One option is to create your own ToolbarExt class derivating from the toolbar and to add an 'Orientation' property:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Example C# code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
namespace ToolkitExt
{
public class ToolbarExt : Toolbar
{
public ToolbarExt()
{
this.DefaultStyleKey = typeof(ToolbarExt);
}
�??
public Orientation Orientation
{
get { return (Orientation)GetValue(OrientationProperty); }
set { SetValue(OrientationProperty, value); }
}
public static readonly DependencyProperty OrientationProperty =
DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ToolbarExt), new PropertyMetadata(Orientation.Horizontal));
}
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML code to put in generic.xaml file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
&amp;lt;ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkitext="clr-namespace:ToolkitExt"&amp;gt;
&amp;lt;Style TargetType="toolkitext:ToolbarExt"&amp;gt;
&amp;lt;Setter Property="ToolbarItemClickEffect" Value="Bounce" /&amp;gt;
&amp;lt;Setter Property="MaxItemHeight" Value="110" /&amp;gt;
&amp;lt;Setter Property="MaxItemWidth" Value="110" /&amp;gt;
&amp;lt;Setter Property="Template"&amp;gt;
&amp;lt;Setter.Value&amp;gt;
&amp;lt;ControlTemplate TargetType="toolkitext:ToolbarExt"&amp;gt;
&amp;lt;StackPanel x:Name="RootElement" Background="Transparent" HorizontalAlignment="Center" Orientation="{TemplateBinding Orientation}"/&amp;gt;
&amp;lt;/ControlTemplate&amp;gt;
&amp;lt;/Setter.Value&amp;gt;
&amp;lt;/Setter&amp;gt;
&amp;lt;/Style&amp;gt;
&amp;lt;/ResourceDictionary&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this class you can initialize the orientation either in XAML or by code at run time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367570#M9462</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-11T17:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Positioning the Esri toolkit vertically in Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367571#M9463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i am going to do the same. build my stackpanel with controls because the time to edit the default template is too much...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed the size of pictures in the toolbar and still it is the standard crap from the esri template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i hate those hidden undocumented standard templates for the layout...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 08:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367571#M9463</guid>
      <dc:creator>MannusEtten</dc:creator>
      <dc:date>2011-12-05T08:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Positioning the Esri toolkit vertically in Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367572#M9464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;i am going to do the same. build my stackpanel with controls because the time to edit the default template is too much...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Building your own container is the right way since the Toolbar control is deprecated from 2.3. ESRI doesn't recommend to use it anymore.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 08:39:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/positioning-the-esri-toolkit-vertically-in/m-p/367572#M9464</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-12-06T08:39:05Z</dc:date>
    </item>
  </channel>
</rss>

