ClusterItem.Items

4 posts, 0 answers
  1. Mehmet
    Mehmet avatar
    3 posts
    Member since:
    Jul 2012

    Posted 13 Aug 2012 Link to this post

    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.
  2. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 16 Aug 2012 Link to this post

    Hi Mehmet,

     The ClusterItem is a single item that represents a collection of grouped (clustered poitns). Please note that you can't index it, the onliest public properties you may use are as presented in our API . Can you please provide some more information on what exactly are you trying to achieve with "set a visual effect on ClusterItem" so that we will be able to help you? A sample image demonstrating what do you expect your map to look like will be great. 

    Regards,
    Evgenia
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. vinutha
    vinutha avatar
    11 posts
    Member since:
    Dec 2014

    Posted 05 Dec 2014 in reply to Evgenia Link to this post

    Hi,

      Could please help me to get the Children id the Cluster Item , I want to displaythe list of children when i right click the cluster. 


    Regards Vinutha
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 08 Dec 2014 Link to this post

    Hello Vinutha,

    Please check out the following forum thread and let us know if the project from 8 Dec 2014 meets your requirements.

    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top