<XapOutputs>false<XapOutputs>
<XapOutputs>true<XapOutputs>
<Extension Url="Extensions/rnd.Layouts.xap" />
LayoutFilePath="Config/Layouts/Glass.xaml"
LayoutFilePath="Config/Layouts/rnd.xaml"
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:rnd="clr-namespace:rnd.Layouts;assembly=rnd.Layouts" > <Grid x:Name="LayoutRoot"> <rnd:customLayout/> </Grid> </UserControl>
MapApplication.Current.Map
<esri:Map x:Name="Map"/>
Create your toolbar in Glass.xml <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="1" > <ContentControl x:Name="MyCustomToolbar" Margin="0,0,0,0"/> </StackPanel>Then add it to the Tools.xml <ToolPanel Name="My Custom Toolbar" ContainerName="MyCustomToolbar" Orientation="Horizontal"> <Tools> </Tools> </ToolPanel> As long as your toolbars are listed in the Tools.xml file you will be able to modify the contents with the viewer. All you're doing is creating another stack panel the viewer will use to add/remove content.You can modify the icon styles in the Shared_Resources.xml file, i.e. my icons are height of 25.
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="1" > <ContentControl x:Name="MyCustomToolbar" Margin="0,0,0,0"/> </StackPanel>
<ToolPanel Name="My Custom Toolbar" ContainerName="MyCustomToolbar" Orientation="Horizontal"> <Tools> </Tools> </ToolPanel>
You can edit the xaml in the layout and move/change the MainToolBar within the default layout. I added the following 2 toolbars. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="1" > <ContentControl x:Name="MainToolbarContainer" Margin="0,0,0,0"/> </StackPanel> <StackPanel Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,40,5,5"> <ContentControl x:Name="NavigationToolbarContainer" Margin="0,0,0,0"/> </StackPanel>and they look like this.[ATTACH=CONFIG]31149[/ATTACH]For me this was the simplest solution and without a having to develop a custom toolbar.
Hi all,I would like to change the look and feel of the MainToolBar in the Viewer.For instance, I would like to use my custom toolbar control.Or replace it with the componentOne Toolbar silverlight control.To which extend is a change possible? Extending, replacing etc?Many many thanks!
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.