0

I would like to improve my productivity to use the correct design. So I add a folder SampleData and a file RestaurantsSampleData.xaml The structure of this file defines :

 xmlns:vm="clr-namespace:GeolocationTest.ViewModels">
<vm:MainViewModel.Pois>
    <vm:Poi Id="1" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald" />
    <vm:Poi Id="2" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="3" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="4" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="5" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="6" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="7" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="8" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="9" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald"/>
    <vm:Poi Id="10" Adresse="20 rue de vinci, 33700 merignac" Name="MacDonald" />
</vm:MainViewModel.Pois>

And my class Pois is

   public class PoiDetail : PoiBase
{
    public String FormattedAddress { get; set; }        
    public String FormattedPhoneNumber { get; set; }
    public String Icon { get; set; }
    public List<Review> Reviews { get; set; }
    public double Latitude { get; set; }
    public double Longitude { get; set; }
}

I would like to add a list in my RestaurantsSampleData.xml to permit to display in the designer of visual studio. Currently I don't find any way to do it and I loose many time between build the application, check the design and modify it. It will more effective to use sample and after plug the real data.


you must initialise _imagesPath before you set values to it:

String _imagesPath[] = new String[2];
Bundle extras = getIntent().getExtras();            
_imagesPath[0] = extras.getString("left");
_imagesPath[1] = extras.getString("right");
4

1 回答 1

0

Use blend to create your sample data if you have it with your copy of Visual Studio 2013

  1. Create a new windows phone silver light project
  2. Create new Sample Data

Described in this link...

http://msdn.microsoft.com/en-us/library/ee341450(v=expression.40).aspx

  1. Drag and drop the Collection onto the mainpaige.xaml

Change the data context of your list when you run the application to see the actual data

于 2014-10-14T04:27:56.453 回答