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

RadCarousel as RowDetail isn't stretching

1 Answer 71 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Rafael
Top achievements
Rank 1
Rafael asked on 26 May 2012, 08:59 PM
Hi Telerik team, I'm facing a problem of using RadCarousel as RowDetail in a GridView, as the RadCarousel path isn't streching along the row detail, only the RadCarousel background is.

The result is a big empty blank space from the RadCarousel, and the Carousel itens left-aligned.

Here is the sample:

<telerik:RadRibbonWindow
    x:Class="EDAS.MainWindow"
    xmlns:telerikRibbon="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonView"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    Title="EDAS - Environmental Documentation Alert System"
    Height="640"
    Width="1024"
    WindowStartupLocation="CenterScreen">
 
    <!-- hidded code -->
 
        <telerik:RadGridView Grid.Row="1"
                             ItemsSource="{Binding Path=Documentos}"
                             CanUserFreezeColumns="False"
                             RowIndicatorVisibility="Collapsed"
                             RowDetailsVisibilityMode="VisibleWhenSelected"
                             AutoGenerateColumns="False"
                             x:Name="DocGrid"
                             IsReadOnly="True"
                             Visibility="{Binding Path=DocVisibility}">
 
    <!-- hidded code -->
 
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <UserControl>
                        <Grid DataContext="{Binding Path=AnexosContext}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.Resources>
                                <Path x:Key="Horizontal"
                                      Stretch="Fill"
                                      Opacity="1"
                                      Data="M 9,200 C9,200 450,200 450,200 "
                                      Stroke="#FFB4B4B4"
                                      StrokeThickness="1" />
                            </Grid.Resources>
                            <telerik:RadCarousel Grid.Row="0" ItemsSource="{Binding Path=Anexos}" HorizontalScrollBarVisibility="Disabled">
                                <telerik:RadCarousel.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <telerik:RadCarouselPanel HorizontalAlignment="Stretch" Path="{StaticResource ResourceKey=Horizontal}" IsContinuous="True" IsPathVisible="True" />
                                    </ItemsPanelTemplate>
                                </telerik:RadCarousel.ItemsPanel>
                            </telerik:RadCarousel>
                            <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
                                <telerik:RadButton Content="Adicionar" Width="75" Command="{Binding Path=AddCommand}" />
                                <telerik:RadButton Content="Remover" Width="75" Command="{Binding Path=DeleteCommand}" />
                            </StackPanel>
                        </Grid>
                    </UserControl>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>
</telerik:RadRibbonWindow>

Am I missing some configuration?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 28 May 2012, 06:48 AM
Hi,

 I've checked your account however since you do not have any downloads I'm not sure about the version of the grid at your end? Can you post more info?

Kind regards,
Vlad
the Telerik team

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

Tags
Carousel
Asked by
Rafael
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or