Select to view content in your preferred language

what happened to the toolbar in the 3.0 API?

3548
16
Jump to solution
07-19-2012 12:02 PM
DanielSchatt
Regular Contributor
hi, just installed the new 3.0 API because I need that for some new functionality, but, unless I'm mistaken, it appears that the Toolbar object is no longer there.  In my coding, I'm getting the message "The name Toolbar does not exist in the namespace http://schemas.esri.com/arcgis/client/2009" and it doesn't appear in the list of ESRI objects that comes up when I try to type it in.    It's also not in the samples anymore.  I've been using this in previous sites and I want to continue using it.  I'm not sure why it would be taken out but if this is the case, is there a way to have the present application I'm building use the previous API?  Thank much!

Dan
0 Kudos
1 Solution

Accepted Solutions
ValentinFedulov
Occasional Contributor
Joe is right, the toolbar has been removed from 3.0 after have been deprecated in 2.3 and 2.4.

If you want, you can still get the code on codeplex and include it in your code.

That being said, the cleaner solution is probbaly that you replace it by your own container (as it was done for the samples).


I download ArcGIS Silverlight Toolkit v2.2 sources and extract Toolbar component and make standalone lib.
This is it - Toolbar only lib from ESRI.ArcGIS.Client.Toolkit
Sources included.
https://www.arcgis.com/home/item.html?id=d0d90aae25604cdca900791589b4856a

View solution in original post

0 Kudos
16 Replies
JoeHershman
MVP Alum
hi, just installed the new 3.0 API because I need that for some new functionality, but, unless I'm mistaken, it appears that the Toolbar object is no longer there.  In my coding, I'm getting the message "The name Toolbar does not exist in the namespace http://schemas.esri.com/arcgis/client/2009" and it doesn't appear in the list of ESRI objects that comes up when I try to type it in.    It's also not in the samples anymore.  I've been using this in previous sites and I want to continue using it.  I'm not sure why it would be taken out but if this is the case, is there a way to have the present application I'm building use the previous API?  Thank much!

Dan


The toolbar has been removed from the 3.0 API http://resources.arcgis.com/en/help/silverlight-api/concepts/index.html#//0166000000m9000000

You can not mix the APIs in a application, you either use 3.0 or you use 2.x, so if you want the new features you will need to remove the toolbar code
Thanks,
-Joe
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Joe is right, the toolbar has been removed from 3.0 after have been deprecated in 2.3 and 2.4.

If you want, you can still get the code on codeplex and include it in your code.

That being said, the cleaner solution is probbaly that you replace it by your own container (as it was done for the samples).
0 Kudos
DanielSchatt
Regular Contributor
thanks so much, Joe and Dominique. 

At the moment I really just need to get my app up and running, at some point I'll build my own panel but frankly I need more familiarity with those core tools and creating my own objects, etc.  So right now I'd just like to have exactly the same references and functionality as before without having to build anything. 

Dominique, I wonder if it's possible for you to give me the basic steps required to add this back in from the Codeplex link.  I downloaded the 2.4 Toolkit and I see the Toolbar folder and the files within that folder:

SelectedToolbarItemArgs.cs
Toolbar.cs
Toolbar.Theme.xaml
ToolbarItem.cs
ToolbarItemCollection.cs

so what do I need to do with these files to add the toolbar back into my project?  thanks again!

Dan
0 Kudos
DanielSchatt
Regular Contributor
p.s. I was trying to mark both your posts as helpful, not sure what happened when I clicked but they were definitely helpful!

Dan
0 Kudos
DominiqueBroux
Esri Frequent Contributor
so what do I need to do with these files to add the toolbar back into my project?


Yes add them in your project.
By security change the namespace to avoid ambiguity with ESRI.ArcGIS.Client.toolkit.
Add Toolbar.Theme.xaml in the merged dictionary of generic.xaml or app.xaml.

That should do it.
0 Kudos
DanielSchatt
Regular Contributor
Dominique, for some reason, it's not working.   I added those 5 files into the project, directly under the project, added the reference in the merged dictionary in App.xaml:

<ResourceDictionary Source'"Toolbar.Theme.xaml"/>

Then I changed every occurrence of "ESRI.ArcGIS.Client.Toolkit" related to the toolbar to my own project name "SeaLevelRise". 

But it's giving me an error that "the name Toolbar does not exist in the namespace clr-SeaLevelRise"

Same for ToolbarItemCollection and ToolbarItem.  Any idea what I'm missing or doing wrong?

Dan
0 Kudos
HoriaTudosie
Frequent Contributor
Maybe is a typo, but the single quote bellow should be a equal sign; if you've cut and paste here from your code, than this is your error...


Dominique, for some reason, it's not working. I added those 5 files into the project, directly under the project, added the reference in the merged dictionary in App.xaml: 

<ResourceDictionary Source  '"Toolbar.Theme.xaml"/> 

Then I changed every occurrence of "ESRI.ArcGIS.Client.Toolkit" related to the toolbar to my own project name "SeaLevelRise".  

But it's giving me an error that "the name Toolbar does not exist in the namespace clr-SeaLevelRise" 

Same for ToolbarItemCollection and ToolbarItem. Any idea what I'm missing or doing wrong? 

Dan
0 Kudos
DominiqueBroux
Esri Frequent Contributor
If your project doesn't comple, likely you forgot to change a namespace somewhere.

Check that all .cs files are using the right namespace (namespace SeaLevelRise { ......).
Check also that Toolbar.Theme.xaml is using that namespace as well.


Else no idea...
0 Kudos
ValentinFedulov
Occasional Contributor
Joe is right, the toolbar has been removed from 3.0 after have been deprecated in 2.3 and 2.4.

If you want, you can still get the code on codeplex and include it in your code.

That being said, the cleaner solution is probbaly that you replace it by your own container (as it was done for the samples).


I download ArcGIS Silverlight Toolkit v2.2 sources and extract Toolbar component and make standalone lib.
This is it - Toolbar only lib from ESRI.ArcGIS.Client.Toolkit
Sources included.
https://www.arcgis.com/home/item.html?id=d0d90aae25604cdca900791589b4856a
0 Kudos