This is a migrated thread and some comments may be shown as answers.

SelectedItem issue

2 Answers 99 Views
SlideView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thiago
Top achievements
Rank 1
Thiago asked on 11 Jul 2012, 02:08 PM
Hello,
I´m using the RadSlideView how an ItemTemplate of a Panorama control. Within the RadSlideView, in yours ItemTemplate, I wish to show some charts, by the way, RadCharts. This RadCharts are generated within an usercontrol, because the data will be manipulated with local data and will generate a chart. The ItemsSource of SlideView is an ObservableCollection of the object model that contains all the data needed for generate the chart. In this scenario, it works! A Panorama Item has a RadSlideView, that has some charts to show. The problem is when other chart is chosen, it always return for the first. This way, if I have 3 charts in the RadSlideView, products, sales and customer, the product´s chart is showed, but when I change to sales, it return to product´s chart. Is this behavior a bug of the RadSlideView or am I missing something? 

Follows the XAML code used:
<phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Key="SlideItemTemplate">
            <StackPanel>
                <local:PainelVisaoGrafico Visao="{Binding}" />
            </StackPanel>
        </DataTemplate>
 
        <DataTemplate x:Key="PanoramaHeaderTemplate">
            <TextBlock Text="{Binding PainelJanela}"
                  FontWeight="ExtraBold"
                  FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                  FontSize="60" />
        </DataTemplate>
 
        <DataTemplate x:Key="PanoramaItemTemplate">
            <StackPanel>
                <telerikPrimitives:RadSlideView x:Name="slideView"
                                   ItemsSource="{Binding Path=Visoes}"
                                   ItemTemplate="{StaticResource SlideItemTemplate}"
                                   Height="520"
                                   Width="420"
                                   SelectionChanged="slideView_SelectionChanged"/>
            </StackPanel>
        </DataTemplate>
 
    </phone:PhoneApplicationPage.Resources>
 
    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <telerikPrimitives:RadBusyIndicator x:Name="busyIndicator"
                              AnimationStyle="AnimationStyle1"
                              Content="Carregando"/>
         
        <controls:Panorama x:Name="pVisoes"
                   Title="{Binding Titulo, ElementName=visualizador}"
                   ItemsSource="{Binding MenuSecundario, ElementName=visualizador}"
                   HeaderTemplate="{StaticResource PanoramaHeaderTemplate}"
                   ItemTemplate="{StaticResource PanoramaItemTemplate}"
                   SelectionChanged="pVisoes_SelectionChanged">
        </controls:Panorama>
    </Grid>

Here is the slideView SelectionChanged event:

private void slideView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var addeds = e.AddedItems;
            var removeds = e.RemovedItems;
 
            if (addeds.Count > 0)
            {
                var item = addeds[0];
            }
                 
        }

Here, the item variable takes the selected item correct .

I don´t know if the problem is the usercontrol that is used to generate charts or the RadSlideView.

The context of this thread (http://www.telerik.com/community/forums/windows-phone/slideview/slideview---prameter-incorect-exception.aspx) is the same that I´m using, except that the error did not appear.

I need your help!

Thanks in advance,

Thiago

2 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 13 Jul 2012, 07:52 AM
Hi Thiago,

Thank you for contacting us. Unfortunately I was unable to reproduce the issue. If possible, could you please send us a sample project reproducing it. This way we would be better able to assist you.

All the best,
Kiril Stanoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Thiago
Top achievements
Rank 1
answered on 13 Jul 2012, 12:47 PM
Hi Kiril,
I´ve opened a support ticket about this issue.
Thank you by the orientation.

Best wishes,

Thiago
Tags
SlideView
Asked by
Thiago
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Thiago
Top achievements
Rank 1
Share this question
or