Identify Sample Help

646
2
01-04-2011 07:41 AM
ElizabethMiller
New Contributor III
I'm trying to get the Identify Sample to work -- I have copied over the sample code. I am getting about 25 errors. Why??

I have added all the ESRI.ArcGIS references.

I have also added:

System.Windows.Controls
System.Windows.Data
System.Windows.Controls.Data.DataForm.Toolkit

I have named my Project ArcGISSilverlightSDK so it matches the sample exactly.

One error is related to this line at the top of my xaml file:

xmlns:slData="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"

The error message reads "Assembly System.Windows.Controls.Data was not found." Where do I find that reference?

Also, I get all these errors too:

'MyMap' is not declared. It may be inaccessible due to its protection level.
'InitializeComponent is not declared. It may be inaccessible due to its protection level.
'IdentifyComboBox' is not declared
'Layout Root' is not declared

All of these are in my xaml.vb file just like in the ArcGIS Sample.

Are there other references I am missing?

Thanks for any help.
0 Kudos
2 Replies
JMcNeil
Occasional Contributor III

The error message reads "Assembly System.Windows.Controls.Data was not found." Where do I find that reference?



In the solution explorer (in V.S. should be on the right).  Right click References > Select Add Reference > Click the .Net tab > Sort the Column "Component Name" just click on the column header/name > Find "System.Windows.Controls.Data" Select it > Click ok.

Rebuild your solution.

J
0 Kudos
JenniferNery
Esri Regular Contributor
Please add reference to .NET Assembly "System.Windows.Controls" to resolve the first error. Try to build the project again, if you still find that some of your controls are still not declared, maybe the XAML and the code-behind do not have a matching namespace.
0 Kudos