How loading radchart within the template tileview

2 posts, 0 answers
  1. Ruben
    Ruben avatar
    1 posts
    Member since:
    Nov 2013

    Posted 28 Mar 2014 Link to this post

    I'm in need of aid, the Tile View loads the correct items, the ItemSource, but when this TileView in "Large" mode or "Maximizade" I wished he carried a RadChart another ItemSource, but by being within the DataTamplate it does not recognize the other "ObservableCollection" and does not load or c # / code behind knows the name of the RadChart 

    Can someone help me or an example of how I do

    <
    telerik:RadWindow.Resources>
          <DataTemplate x:Key="contentTemplate">
             <telerik:RadFluidContentControl>
                  <telerik:RadFluidContentControl.Content>
                            <Grid>
     
                            </Grid>
                 <telerik:RadFluidContentControl.Content>
                 <telerik:RadFluidContentControl.LargeContent>
                   <Grid>
                     <telerik:RadChart x:Name="radChart2"  Margin="0,120,0,0">
                                <telerik:RadChart.SeriesMappings>
                                    <telerik:SeriesMapping ItemsSource="{ Binding Path=Series1Items, Mode=TwoWay}">
                                        <telerik:SeriesMapping.SeriesDefinition>
                                            <telerik:LineSeriesDefinition />
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:SeriesMapping.ItemMappings>
                                            <telerik:ItemMapping FieldName= "XCat"
                                                 DataPointMember="XCategory" />
                                            <telerik:ItemMapping FieldName="YVal"
                                                 DataPointMember="YValue" />
                                        </telerik:SeriesMapping.ItemMappings>
                                    </telerik:SeriesMapping>
     
                                    <telerik:SeriesMapping ItemsSource="{Binding Path=Series2Items, Mode=TwoWay}">
                                        <telerik:SeriesMapping.SeriesDefinition>
                                            <telerik:LineSeriesDefinition />
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:SeriesMapping.ItemMappings>
                                            <telerik:ItemMapping FieldName="XCat"
                                                 DataPointMember="XCategory" />
                                            <telerik:ItemMapping FieldName="YVal"
                                                 DataPointMember="YValue" />
                                        </telerik:SeriesMapping.ItemMappings>
                                    </telerik:SeriesMapping>
                                </telerik:RadChart.SeriesMappings>
                                <telerik:RadChart.DefaultView>
                                    <telerik:ChartDefaultView>
                                        <telerik:ChartDefaultView.ChartArea>
                                            <telerik:ChartArea>
                                                <telerik:ChartArea.AxisX>
                                                    <telerik:AxisX  />
                                                </telerik:ChartArea.AxisX>
                                                <telerik:ChartArea.AxisY>
                                                    <telerik:AxisY />
                                                </telerik:ChartArea.AxisY>
                                            </telerik:ChartArea>
                                        </telerik:ChartDefaultView.ChartArea>
                                    </telerik:ChartDefaultView>
                                </telerik:RadChart.DefaultView>
                            </telerik:RadChart>
                        </Grid>
                    </telerik:RadFluidContentControl.LargeContent>
                </telerik:RadFluidContentControl>
            </DataTemplate>
    </telerik:RadWindow.Resources>
     
    <Gird>
     <telerik:RadTileView x:Name="list_mon"
                                 IsAutoScrollingEnabled="True"
                                 MinimizedColumnWidth="150"
                                 MinimizedRowHeight="150"
                                 RowHeight="260"
                                 MaxColumns="2"
                                 BorderThickness="0"
                                 Padding="0"
                                 BorderBrush="Transparent"
                                 Background="Transparent"
                                 telerik:TileViewPanel.IsVirtualized="True"
                                 FontSize="14"
                                 FontFamily="Segoe UI"                       
                                 Foreground="#FFFFFF"
                                 ItemsSource="{Binding ValoresList}"
                                 ItemTemplate="{StaticResource headerTemplate}"
                                 ContentTemplate="{StaticResource contentTemplate}"
                                 TileStateChanged="tileView1_TileStateChanged" Margin="0,88,0,0"   />
    </Grid>
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 02 Apr 2014 Link to this post

    Hello Ruben,

    I can see that you are using the RadFluidContentControl to switch the content of the RadTileViewItems depending on the state of the items.

    However, you need to have in mind that in this case you need to manually change the State property of the RadFluidContentControl. Such approach is demonstrated in this article.
    Please take a look at it and let us know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    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.

     
  3. DevCraft banner
Back to Top