Select to view content in your preferred language

Package Tools

1375
14
10-22-2010 01:30 PM
JayKappy
Frequent Contributor
I am looking at this web site for direction.
http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#AttributeQuery
There are a bunch of query tools like Find, identify, spatial query etc.

What I want to do is get these in a Tool bar and fire them from a button....how do I do that...by placing teh code randomly in the xaml file it runs right off the bat....I only want to fire that tools code when I click the button.....

Thanks in Advance....very new to this....apprciated.
0 Kudos
14 Replies
JayKappy
Frequent Contributor
I do thank you very much for your thoughts and help....I am trying here....
Is there a place where I can go to learn or see what options I have other than COMBOBOX - TEXTBLOCK....
I can get a combobox thing to show up with the options in it BUT I AM LOOKING to have an image there...to act like a button that expands the list....

I guess this is cool but I am looking to have a button and ONCLick event on that choice like the example above.....
But that ESRI example is using a bunch of additional CS pages KBar, MenuIcon etc.....Cant I simply use the button calls like that example?????


                                <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>
0 Kudos
JayKappy
Frequent Contributor
...................................................................
0 Kudos
JayKappy
Frequent Contributor
I can add Radion buttons....and have an ONCLCK event (I Have this working and it calls the vb and turns on the imagery)....BUT I CANNOT get a click event to work on the TEXTBLOCK in the combobox.....so nothing happens when I click the text in the dropdown....
The button below obviosly dosent work....

What else can I use instead of the combobox?  I want an image there...

What I am after:
Have an image in the toolbar
Hover over it and have it expand to show choices
click a choice (tool, turn on layer etc)
When I move off the button or expanded selection list it closes automatically....


                                
<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>
0 Kudos
JenniferNery
Esri Regular Contributor
Yeah you can use any control that you wish to use. I just suggested ComboBox because you wanted a drop down menu. Try it the way you wanted it first. Go through tutorials too.
0 Kudos
JayKappy
Frequent Contributor
Alright I am almost there....
I can add the toolbar and add Buttons that fire off ZoomIn, ZoomOut etc
I can add a Dropdown with choices...

BUT:
In the COMBOBOX I have a TEXTBLOCK There is no OnClick to fire code off.
I can do this with a Radion Button but then the Combobox dosent close

What I was tryign to do is get a toolbar that will have buttons to fire off tools (DONE)
BUT now what I want is a Button in the toolbar (image or whatever) that when hovered over opens a dialog box (that appears like a dropdownbox) and gives the user choices....Very similar to a dropdown box but not a dropdown box...

I have been going through the tutorials....
I found what I wanted....A toolbar with images that when you hover over them it drops down a list of choices....As I have said this is all in CS and broken into a KBar assembly...or soemthing...where there are a bunch of additional CS pages.
I have not found 1 example of how to put an image/button/???? in the toolbar that will give the user a list when they hover over it....other than the one mentioned above

Example (THE STANDARD EXAMPLE HAS A MENU DROP DOWN)
http://help.arcgis.com/en/webapi/silverlight/samples/TemplateGalleryWeb/start.htm

I trully appreciate your help here....it is greatly appreciated...I am slowly learning this and hope to some day pass it forward....
0 Kudos