Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 145
TSQL 76
SSRS 70
SSIS 67
XML 57

Top Categories · View All
SQL Server 145
TSQL 76
SSRS 70
SSIS 67
XML 57

Data template an image to a bing map using silverlight? is it possible?

Mar 6 2011 12:00AM by nayyad   

Here is my code:

<UserControl.Resources>
        <DataTemplate x:Key="LogoTemplate">
            <Image Souce="pin.png" Width="100" Height="100"  m:MapLayer.Position="{Binding Location}" Tag="{Binding Name}"   
            Opacity="1" UseLayoutRounding="false"  />
            <!--<m:Pushpin m:MapLayer.Position="{Binding Location}"    Background="Orange"     >
            </m:Pushpin>-->
        </DataTemplate>
        <!--<DataTemplate x:Key="logoTem2">
       </DataTemplate>-->
            <t:LocationDataCollection x:Key="LocationList" IsDataSource="True"    />
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <m:Map CredentialsProvider="Ak0QYnxJb69SewXWdXHU5esYGd_wKp47uozov34pmduqApyRYaa4TVl1Z7TU_r3R" x:Name="MyMap" Grid.Row="1" Mode="AerialWithLabels" Center="{Binding coord}" ZoomLevel="14" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
                <m:MapItemsControl x:Name="ListOfItems"
                        ItemTemplate="{StaticResource LogoTemplate}"
                        ItemsSource="{StaticResource LocationList}">
                </m:MapItemsControl>
            <!--<m:MapLayer x:Name="MyLayer2">
                <m:MapItemsControl x:Name="ListOfItems1"
                        ItemTemplate="{StaticResource LogoTemplate}"
                        ItemsSource="{StaticResource LocationList}">
                </m:MapItemsControl>
            </m:MapLayer>-->
        </m:Map>
    </Grid>
</UserControl>

im trying to databind a custome pushpin to my map but it wont work my code is above ... it works if i replace the image with ellipse... is it possible wat im trying to do?

Submitted under: ASP.NET ·  ·  ·  · 


nayyad
1600 · 0% · 12

2 Replies

  • It seems some of your code is missing. What is definition of LogoTemplate ?

    commented on Mar 6 2011 11:56PM
    Dinesh Sodani
    30 · 6% · 1807
  • It seems there were some formating issue.

    <UserControl.Resources>
        <DataTemplate x:Key="amg">
            <Image Source="pin.png" Width="50" Height="50"   />
        </DataTemplate> 
        <DataTemplate x:Key="LogoTemplate">
            <m:Pushpin m:MapLayer.Position="{Binding Location}"  Background="Blue"    ContentTemplate="{StaticResource amg}">
            </m:Pushpin>        
        </DataTemplate>
    

    commented on Mar 7 2011 5:32AM
    Dinesh Sodani
    30 · 6% · 1807

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]