Hi,
I have a radCarousel control with custom items. When I show first time, it shows all items, but when the user move mouse pointer over it, all items disappear from carousel and Output windows show this:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ReflectionSettings.HiddenPercentage; DataItem=null; target element is 'GradientStop' (HashCode=36177439); target property is 'Offset' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'VisualBrush' (HashCode=13645305); target property is 'Visual' (type 'Visual')
This is my XAML Code:
<Window.Resources>
<Style TargetType="{x:Type telerik:CarouselItem}">
<Setter Property="Height" Value="600"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselItem}">
<Grid>
<Rectangle HorizontalAlignment="Center" VerticalAlignment="Top" Width="300" Height="400" RadiusX="6" RadiusY="6" StrokeThickness="1" Stroke="#FF47587C" Fill="Black"/>
<Rectangle x:Name="recName" Margin="60,10,60,540" Stroke="Black"
RadiusX="6" RadiusY="6" StrokeThickness="1">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Name="X">
<GradientStop Color="#FF020F1F" Offset="0.138"/>
<GradientStop Color="#FF032247" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter IsHitTestVisible="True"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<StackPanel HorizontalAlignment="Center" TextElement.FontSize="20" TextElement.FontWeight="Bold" TextElement.Foreground="#FFBEC4DE">
<Label Content="{Binding Path=Fullname}" Margin="0,13,0,19" HorizontalAlignment="Center" TextElement.Foreground="#FFBEC4DE"/>
<Image x:Name="imgInternal" Width="274" Height="270" Stretch="Fill" Source="{Binding Path=PictureFullPath}" />
<Label HorizontalAlignment="Center" Margin="0,10,0,0" Content="{Binding Path=Position}" TextElement.FontSize="16" TextElement.FontWeight="Normal" TextElement.Foreground="#FFBEC4DE"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
This is radCarousel control:
<telerik:RadCarousel x:Name="rcUsers" Background="Black" Height="500" Margin="100,50,100,-120" HorizontalAlignment="Center" VerticalAlignment="Top" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" SelectionChanged="rcUsers_SelectionChanged" MouseDoubleClick="rcUsers_MouseDoubleClick" />
Thanks in advance,
Carlos De Jesus
I have a radCarousel control with custom items. When I show first time, it shows all items, but when the user move mouse pointer over it, all items disappear from carousel and Output windows show this:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ReflectionSettings.HiddenPercentage; DataItem=null; target element is 'GradientStop' (HashCode=36177439); target property is 'Offset' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'VisualBrush' (HashCode=13645305); target property is 'Visual' (type 'Visual')
This is my XAML Code:
<Window.Resources>
<Style TargetType="{x:Type telerik:CarouselItem}">
<Setter Property="Height" Value="600"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselItem}">
<Grid>
<Rectangle HorizontalAlignment="Center" VerticalAlignment="Top" Width="300" Height="400" RadiusX="6" RadiusY="6" StrokeThickness="1" Stroke="#FF47587C" Fill="Black"/>
<Rectangle x:Name="recName" Margin="60,10,60,540" Stroke="Black"
RadiusX="6" RadiusY="6" StrokeThickness="1">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Name="X">
<GradientStop Color="#FF020F1F" Offset="0.138"/>
<GradientStop Color="#FF032247" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<ContentPresenter IsHitTestVisible="True"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
<StackPanel HorizontalAlignment="Center" TextElement.FontSize="20" TextElement.FontWeight="Bold" TextElement.Foreground="#FFBEC4DE">
<Label Content="{Binding Path=Fullname}" Margin="0,13,0,19" HorizontalAlignment="Center" TextElement.Foreground="#FFBEC4DE"/>
<Image x:Name="imgInternal" Width="274" Height="270" Stretch="Fill" Source="{Binding Path=PictureFullPath}" />
<Label HorizontalAlignment="Center" Margin="0,10,0,0" Content="{Binding Path=Position}" TextElement.FontSize="16" TextElement.FontWeight="Normal" TextElement.Foreground="#FFBEC4DE"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
This is radCarousel control:
<telerik:RadCarousel x:Name="rcUsers" Background="Black" Height="500" Margin="100,50,100,-120" HorizontalAlignment="Center" VerticalAlignment="Top" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" SelectionChanged="rcUsers_SelectionChanged" MouseDoubleClick="rcUsers_MouseDoubleClick" />
Thanks in advance,
Carlos De Jesus