<esriToolkit:ToolbarItem Text="TESTING"> <esriToolkit:ToolbarItem.Content> <ComboBox HorizontalAlignment="Center" Width="35" Margin="2"> <ComboBox.Items> <TextBlock x:Name="ZoomIn" Text="ZoomIn" HorizontalAlignment="Center"/> <TextBlock x:Name="ZoomOut" Text="ZoomOut" HorizontalAlignment="Center"/> <Button x:Name="Button" Tag="4" Click="RadioButton_Click" Background="Azure"/> <RadioButton x:Name="StreetsRadioButton0" Tag="0" IsChecked="False" Margin="5,0,0,0" Foreground="Black" GroupName="Layers" Content="Streets" Click="RadioButton_Click"/> </ComboBox.Items> </ComboBox> </esriToolkit:ToolbarItem.Content> </esriToolkit:ToolbarItem>
<esriToolkit:ToolbarItem Text="TESTING"> <esriToolkit:ToolbarItem.Content> <ComboBox HorizontalAlignment="Center" Width="35"> <ComboBox.Items> <TextBlock x:Name="ZoomIn" Text="ZoomIn" HorizontalAlignment="Center"/> <TextBlock x:Name="ZoomOut" Text="ZoomOut" HorizontalAlignment="Center"/> </ComboBox.Items> </ComboBox> </esriToolkit:ToolbarItem.Content> </esriToolkit:ToolbarItem>
<!-- ToolBar --> <Grid Height="60" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,10,10,0" > <Rectangle Fill="#22000000" RadiusX="10" RadiusY="10" Margin="0,4,0,0" /> <Rectangle Fill="#775C90B2" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,5" /> <Rectangle Fill="#66FFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" /> <StackPanel Orientation="Vertical"> <esriToolkit:Toolbar x:Name="MyToolbar" MaxItemHeight="40" MaxItemWidth="40" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Center" Loaded="MyToolbar_Loaded" ToolbarItemClicked="MyToolbar_ToolbarItemClicked" ToolbarIndexChanged="MyToolbar_ToolbarIndexChanged" Width="320" Height="40"> <esriToolkit:Toolbar.Items> <esriToolkit:ToolbarItemCollection> <esriToolkit:ToolbarItem Text="TESTING"> <esriToolkit:ToolbarItem.Content> <ComboBox HorizontalAlignment="Center" SelectionChanged="ComboBox_SelectionChanged"> <ComboBox.Items> <Image x:Name="ZoomIn" Source="/Assets/images/i_zoomin.png" Stretch="UniformToFill" Margin="2"/> <Image x:Name="ZoomOut" Source="/Assets/images/i_zoomout.png" Stretch="UniformToFill" Margin="2"/> </ComboBox.Items> </ComboBox> </esriToolkit:ToolbarItem.Content> </esriToolkit:ToolbarItem> <esriToolkit:ToolbarItem Text="Zoom In"> <esriToolkit:ToolbarItem.Content> <Image Source="/Assets/images/i_zoomin.png" Stretch="UniformToFill" Margin="2" /> </esriToolkit:ToolbarItem.Content> </esriToolkit:ToolbarItem> <esriToolkit:ToolbarItem Text="Zoom Out"> <esriToolkit:ToolbarItem.Content> <Image Source="/Assets/images/i_zoomout.png" Stretch="UniformToFill" Margin="2" /> </esriToolkit:ToolbarItem.Content> </esriToolkit:ToolbarItem> </esriToolkit:ToolbarItemCollection> </esriToolkit:Toolbar.Items> </esriToolkit:Toolbar> <TextBlock x:Name="StatusTextBlock" Text="" FontWeight="Bold" HorizontalAlignment="Center"/> </StackPanel> </Grid>
Any example with one button/image that drops down and links to a zoom tool is all I am looking for.
<ComboBox VerticalAlignment="Top" HorizontalAlignment="Center" Height="55" Width="70" SelectedIndex="0" SelectionChanged="ComboBox_SelectionChanged"> <ComboBox.Items> <Image x:Name="ZoomIn" Source="images/i_zoomin.png" Height="35" Width="35" Stretch="None"/> <Image x:Name="ZoomOut" Source="images/i_zoomout.png" Height="35" Width="35" Stretch="None"/> </ComboBox.Items> </ComboBox>
KBar, MenuIcon, SubButton referenced below were additional cs files in the project. They each had a new namespace ex KBar....which is called in themain xaml file seen below....What kind of NEW ITEM was created to create these when you right click the folder that was added?
<src:KBar x:Name="MyIC" Margin="10" Width="400" HorizontalAlignment="Left" CurrentTool="None"> <src:KBar.Items> <src:MenuIcon ImgSource="Assets/images/i_globe.png" ButtonText="Map"> <src:MenuIcon.Items> <src:SubButton ButtonID="streetmap" ImgSource="Assets/images/i_highway.png" ButtonText="Street Map" Click="OnClick" /> <src:SubButton ButtonID="satellite" ImgSource="Assets/images/i_satellite.png" ButtonText="Satellite Map" Click="OnClick"/> <src:SubButton ButtonID="overview" ImgSource="Assets/images/i_overview.png" ButtonText="Overview Map" Click="OnClick"/> </src:MenuIcon.Items> </src:MenuIcon>
This is some of the very basic of Silverlight development, so I would suggest you look through the tutorials on Silverlight, especially #3 and #4: http://www.silverlight.net/learn/quickstarts/ and http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-6-using-user-controls-to-implement-master-detail-scenarios.aspx On a side note the sample you refer to is a very advanced sample. If this is among your first ventures into Silverlight, you are in for a challenge 🙂 The "sample" is nver built to be reused or customized. It's just a sample that showcases some of the features that the API can do. It's not a very good end-user app.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.