Select to view content in your preferred language

ArcGIS API for Microsoft Silverlight/WPF samples empty

810
2
07-14-2010 08:12 AM
TonyAlmeida
MVP Regular Contributor
I have installed
    * Visual Web Developer Express 2010
    * Silverlight 4 Tools for Visual Studio
    * Expression Blend 4 SDK for Silverlight
    * ArcGIS API for Microsoft Silverlight/WPF

I create a new project, select Silverlight application under Visual C#, Silverlight. I leave the New Web Project type: "ASP.NET Web Application Project". Then i add the ESRI References to my project. Copy the Sample from the ArcGIS API for Microsoft silverlight and  when I run the project  i get nothing but a blank white screen. I have tried the basic sample and nothing but blank white screen.  Oh i did get an error when i first ran the project, the error was "InitializeComponent" does not exist in the current context, i click on the error and select generate method stud for 'InitializeComponent' in 'SilverlightApplication2.MainPage' after that the error went away, but i am still getting a blank white screen with no error now...I do not get an error in Visual nor do a get a 404 in feddler... I don't understand.

<UserControl x:Class="ArcGISSilverlightSDK.DynamicMap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White" >

        <esri:Map x:Name="MyMap" >
            <esri:ArcGISDynamicMapServiceLayer ID="MyLayer"
                Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe..." />
        </esri:Map>

    </Grid>
</UserControl>
0 Kudos
2 Replies
AngelGonzalez
Frequent Contributor
I have installed
    * Visual Web Developer Express 2010
    * Silverlight 4 Tools for Visual Studio
    * Expression Blend 4 SDK for Silverlight
    * ArcGIS API for Microsoft Silverlight/WPF

I create a new project, select Silverlight application under Visual C#, Silverlight. I leave the New Web Project type: "ASP.NET Web Application Project". Then i add the ESRI References to my project. Copy the Sample from the ArcGIS API for Microsoft silverlight and  when I run the project  i get nothing but a blank white screen. I have tried the basic sample and nothing but blank white screen.  Oh i did get an error when i first ran the project, the error was "InitializeComponent" does not exist in the current context, i click on the error and select generate method stud for 'InitializeComponent' in 'SilverlightApplication2.MainPage' after that the error went away, but i am still getting a blank white screen with no error now...I do not get an error in Visual nor do a get a 404 in feddler... I don't understand.

<UserControl x:Class="ArcGISSilverlightSDK.DynamicMap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White" >
...
       


The name of your project is SilverlightApplication2.MainPage not ArcGISSilverlightSDK.DynamicMap. Try replacing it on the first line.
0 Kudos
TonyAlmeida
MVP Regular Contributor
angelg thanks, LOL what a rookie mistake.
0 Kudos