We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LabelSource not binding at runtime

Thread ID:





103483 May 5,2012 10:10 PM UTC May 16,2012 01:10 PM UTC WPF 1
Tags: Maps
Asked On May 5, 2012 10:10 PM UTC

I am using the following XAML in my application based on your Databinding demo code.

<syncfusion:MapControl ShowLatLonPoints="False" ShapeFill="#F5F1EE" ShapeStroke="#B5B3B1" Name="Map" LayeredContent="{Binding ElementName=shapeLayer}"  >
                                <syncfusion:ShapeFileLayer  LabelSource="{Binding CountryCount}" Uri="Application.Assets.world.shp" x:Name="shapeLayer"/>

When the map loads none of the labels are showing up.  The only difference I can see is that in your sample you use the source as a StaticResource instead of databinding to a ViewModel.  Can you provide some guidance? 

The LabelSource object I am binding too is an exact copy of your ObservableCollection<MapsLabel>. 

Rajkumar [Syncfusion]
Replied On May 16, 2012 01:10 PM UTC

Hi John,

Sorry for the delayed response.

We have analyzed the reported issue and this issue occurs when the “ShapeFileLayer” is placed inside the Layers collection. However this can be achieved by placing ShapeFileLayer inside “LayeredContent” as in below code snippet, the labels will display in Map.

Code Snippet:

<syncfusion:MapControl  LatitudeLongitudeType="Decimal" ShapeFill="#FFB67373" ShapeStroke="#B5B3B1" Name="Map"  ShapeStrokeThickness="1.5" EnableHoverEffects="True" ShapeHoverFill="#3FB67373" ShowNavigationControl="False" ShowLatLonPoints="False"  >
<syncfusion:ShapeFileLayer Margin="100"    LabelSource="{Binding Labels}" Uri="DataBindingDemo.ShapeFiles.states.shp" x:Name="shapeLayer"/>

We are analyzing the problem while using inside "ShapeFileLayer" in source level and we will update you the status.

Please let us know if you have any concerns.

Rajkumar B R


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon