This question is locked. New answers and comments are not allowed.
Hello,
I have a SlideView with the structure as:
<telerikPrimitives:RadSlideView x:Name="radSlideView" ItemsSource="{Binding}"
Loaded="RadSlideView_Loaded">
<telerikPrimitives:RadSlideView.ItemTemplate>
<DataTemplate>
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image x:Name="imgMain" Source="{Binding Image}" Stretch="Uniform"/>
<StackPanel x:Name="stackCurrentStatus" Grid.Row="1" Orientation="Horizontal"
HorizontalAlignment="Right" Margin="0,0,0,5">
<TextBlock Text="Album: " FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
<TextBlock Text="{Binding AlbumName}"/>
<Ellipse Width="6" Height="6" Fill="#3bb23b" Margin="6,0,6,0" VerticalAlignment="Center"/>
<TextBlock Text="{Binding PicIndexInAlbum}"/>
<TextBlock Text=" of "/>
<TextBlock Text="{Binding TotalPicsInAlbum}"/>
</StackPanel>
</Grid>
</DataTemplate>
</telerikPrimitives:RadSlideView.ItemTemplate>
</telerikPrimitives:RadSlideView>
My requirement is that I need to show images inside RadSlideView without any blurred effect. For that, I have to resize my images (if required). Say, if my image's dimensions are larger than the dimensions of Image control declared inside RadSlideView, I need to resize the original image.
For resizing, i need the target/new dimensions. I can get the actual rendered dimension of my ImageView inside "SelectionChanged" event but I need this dimension before I use:
this.slideView..ItemsSource = List<Object>;
For this, i tried using Loaded event of RadSlideView like shown below but unable to get the access to Image control.
private void RadSlideView_Loaded(object sender, RoutedEventArgs e)
{
try
{
RadSlideView slideView = sender as RadSlideView;
if (slideView != null)
{
Image imgObj = ElementTreeHelper.FindVisualDescendant<Image>(radSlideView.SelectedItemContainer);
if (imgObj != null)
{
///do code here
}
}}}
In above code, the object imgObj is coming out to be Null.
Can you please let me know how can i know in advance (before actual rendering) the dimensions of the Image control in RadSlideView?
Thanks,
Pooja Arora
I have a SlideView with the structure as:
<telerikPrimitives:RadSlideView x:Name="radSlideView" ItemsSource="{Binding}"
Loaded="RadSlideView_Loaded">
<telerikPrimitives:RadSlideView.ItemTemplate>
<DataTemplate>
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image x:Name="imgMain" Source="{Binding Image}" Stretch="Uniform"/>
<StackPanel x:Name="stackCurrentStatus" Grid.Row="1" Orientation="Horizontal"
HorizontalAlignment="Right" Margin="0,0,0,5">
<TextBlock Text="Album: " FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
<TextBlock Text="{Binding AlbumName}"/>
<Ellipse Width="6" Height="6" Fill="#3bb23b" Margin="6,0,6,0" VerticalAlignment="Center"/>
<TextBlock Text="{Binding PicIndexInAlbum}"/>
<TextBlock Text=" of "/>
<TextBlock Text="{Binding TotalPicsInAlbum}"/>
</StackPanel>
</Grid>
</DataTemplate>
</telerikPrimitives:RadSlideView.ItemTemplate>
</telerikPrimitives:RadSlideView>
My requirement is that I need to show images inside RadSlideView without any blurred effect. For that, I have to resize my images (if required). Say, if my image's dimensions are larger than the dimensions of Image control declared inside RadSlideView, I need to resize the original image.
For resizing, i need the target/new dimensions. I can get the actual rendered dimension of my ImageView inside "SelectionChanged" event but I need this dimension before I use:
this.slideView..ItemsSource = List<Object>;
For this, i tried using Loaded event of RadSlideView like shown below but unable to get the access to Image control.
private void RadSlideView_Loaded(object sender, RoutedEventArgs e)
{
try
{
RadSlideView slideView = sender as RadSlideView;
if (slideView != null)
{
Image imgObj = ElementTreeHelper.FindVisualDescendant<Image>(radSlideView.SelectedItemContainer);
if (imgObj != null)
{
///do code here
}
}}}
In above code, the object imgObj is coming out to be Null.
Can you please let me know how can i know in advance (before actual rendering) the dimensions of the Image control in RadSlideView?
Thanks,
Pooja Arora