Hi,
I am trying to set a visual effect on ClusterItem by depending on the child items properties. I sent the ClusterItem to an IValueConverter and while debugging i can't see the child items in my ClusterItem but on coding there is no any property named items.
here is my Cluster template :
<DataTemplate x:Key="ClusterTemplate">
<Grid x:Name="ParentRoot"
Width="40" Height="40"
telerik:MapLayer.Location="{Binding Path=Center}"
telerik:MapLayer.HotSpot="0.5,1"
MouseLeftButtonUp="ClusterMouseClick"
MouseRightButtonUp="ClusterRightMouseClick">
<Path Data="M978.6509,491.334L958.6109,491.334L954.4549,500.874L949.9999,491.334L930.6259,491.334C928.4169,491.334,926.6259,489.543,926.6259,487.334L926.6259,433.272C926.6259,431.063,928.4169,429.272,930.6259,429.272L978.6509,429.272C980.8599,429.272,982.6509,431.063,982.6509,433.272L982.6509,487.334C982.6509,489.543,980.8599,491.334,978.6509,491.334z"
StrokeStartLineCap="Flat"
Stretch="Fill"
StrokeEndLineCap="Flat"
Stroke="{Binding Converter={StaticResource alarmIndicator}}"
StrokeThickness="1"
StrokeMiterLimit="10"
StrokeLineJoin="Miter"
Fill="#7F000000"/>
<!-- Title -->
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="5"
TextAlignment="Center"
Foreground="White"
FontSize="12"
Width="36"
TextWrapping="Wrap"
Text="{Binding Path=Count}"/>
</Grid>
</DataTemplate>
And my Converter:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
return null;
ClusterItem item = (value as ClusterItem);
var items = item.Items; // this is not possible
........
return something;
}
I can see and inspect the items while debugging and also i can reach that property through immediate window, but i cant get that property through coding.
How can i get child items properties? Any idea...
Thanks anyway.
I am trying to set a visual effect on ClusterItem by depending on the child items properties. I sent the ClusterItem to an IValueConverter and while debugging i can't see the child items in my ClusterItem but on coding there is no any property named items.
here is my Cluster template :
<DataTemplate x:Key="ClusterTemplate">
<Grid x:Name="ParentRoot"
Width="40" Height="40"
telerik:MapLayer.Location="{Binding Path=Center}"
telerik:MapLayer.HotSpot="0.5,1"
MouseLeftButtonUp="ClusterMouseClick"
MouseRightButtonUp="ClusterRightMouseClick">
<Path Data="M978.6509,491.334L958.6109,491.334L954.4549,500.874L949.9999,491.334L930.6259,491.334C928.4169,491.334,926.6259,489.543,926.6259,487.334L926.6259,433.272C926.6259,431.063,928.4169,429.272,930.6259,429.272L978.6509,429.272C980.8599,429.272,982.6509,431.063,982.6509,433.272L982.6509,487.334C982.6509,489.543,980.8599,491.334,978.6509,491.334z"
StrokeStartLineCap="Flat"
Stretch="Fill"
StrokeEndLineCap="Flat"
Stroke="{Binding Converter={StaticResource alarmIndicator}}"
StrokeThickness="1"
StrokeMiterLimit="10"
StrokeLineJoin="Miter"
Fill="#7F000000"/>
<!-- Title -->
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="5"
TextAlignment="Center"
Foreground="White"
FontSize="12"
Width="36"
TextWrapping="Wrap"
Text="{Binding Path=Count}"/>
</Grid>
</DataTemplate>
And my Converter:
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
return null;
ClusterItem item = (value as ClusterItem);
var items = item.Items; // this is not possible
........
return something;
}
I can see and inspect the items while debugging and also i can reach that property through immediate window, but i cant get that property through coding.
How can i get child items properties? Any idea...
Thanks anyway.