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. Image for the cookie policy date
close icon

Levels does not work when control is in DataTamplate.

<syncfusion:ChromelessWindow x:Class="TreeMapDrillDown.MainWindow" UseNativeChrome="True"
                           xmlns:local="clr-namespace:TreeMapDrillDown"
                           xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
                           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                           syncfusion:SkinStorage.VisualStyle="Metro" Icon="App.ico"
                           ResizeMode="CanResizeWithGrip"
  WindowStartupLocation="CenterScreen">

    <syncfusion:ChromelessWindow.Resources>
        <DataTemplate x:Key="TreeMapDataTemplate">
            <Grid>
                <Grid.DataContext>
                    <local:MyTreeMap/>
                </Grid.DataContext>
              
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <syncfusion:SfTreeMap EnableDrillDown="True"  Grid.Row="0" 
                                      ItemsSource="{Binding DataContext.TestSales, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}" 
                                      Levels="{Binding DataContext.MyTreeMapHierarchicalLevels, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}"
                                      WeightValuePath="Sales" 
                                      ColorValuePath="Sales" 
                                      Margin="10" 
                                      ShowToolTip="False">
                </syncfusion:SfTreeMap>
            </Grid>
        </DataTemplate>
    </syncfusion:ChromelessWindow.Resources>
    <ContentControl ContentTemplate="{StaticResource TreeMapDataTemplate}"/>
</syncfusion:ChromelessWindow>

1 Reply

MV Mohana V Syncfusion Team August 4, 2016 12:25 PM UTC

Hi Arsen,

Thanks for using syncfusion products.

We are able to reproduce the reported issue "Levels does not work when control is in DataTamplate" and we have logged an issue report for this.

The fix for this issue will be available in our essential studio volume 3 2016 release which is expected to be released on end of September 2016.

Regards,
Mohana V

Loader.
Live Chat Icon For mobile
Up arrow icon