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

Bug in new version of slideview

1 Answer 36 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.
Winify
Top achievements
Rank 1
Winify asked on 03 Mar 2015, 02:13 PM
we have an old project we tried to update to work on wp 8.1. Updateing sdk is ok and application work as expected. But when we updated telerik components to build with latest version we meet this bug:

{
System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
}

Here is our page xaml:

<phone:PhoneApplicationPage 
    x:Class="MainProspekt.PViewerVer1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikPrimitivesSlideView="clr-namespace:Telerik.Windows.Controls.SlideView;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikPagination="clr-namespace:Telerik.Windows.Controls.Pagination;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"
    
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded" Unloaded="PhoneApplicationPage_Unloaded">

    <Grid x:Name="LayoutRoot" Background="Transparent" ShowGridLines="True">
        <telerikPrimitives:RadSlideView x:Name="slideView" ItemsSource="{Binding Images}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" IsLoopingEnabled="False">
            <telerikPrimitives:RadSlideView.ItemTemplate>
                <DataTemplate>
                    <telerikPrimitivesSlideView:PanAndZoomImage x:Name="zoomer" Source="{Binding LowQImage}" ZoomMode="Free" MaximumZoom="100,100" RenderTransformOrigin="0.5,0.5" >
                        <telerikPrimitivesSlideView:PanAndZoomImage.BusyIndicatorStyle>
                            <Style TargetType="telerikPrimitives:RadBusyIndicator">
                                <Setter Property="AnimationStyle" Value="AnimationStyle9"/>
                                <Setter Property="InitialDelay" Value="0:0:0"/>
                                <Setter Property="ContentPosition" Value="Bottom" />
                                <Setter Property="Content" Value="Lade" />
                            </Style>
                        </telerikPrimitivesSlideView:PanAndZoomImage.BusyIndicatorStyle>
                    </telerikPrimitivesSlideView:PanAndZoomImage>
                </DataTemplate>
            </telerikPrimitives:RadSlideView.ItemTemplate>

        </telerikPrimitives:RadSlideView>
        <telerikPrimitives:RadPaginationControl PageProvider="{Binding ElementName=slideView}" DisplayMode="IndexLabel" x:Name="pag">
            <telerikPrimitives:RadPaginationControl.LayoutDefinition>
                <telerikPrimitives:PaginationControlLayoutDefinition 
                    IndexLabelPosition="0, 1">
                    <telerikPrimitives:PaginationControlLayoutDefinition.Rows>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </telerikPrimitives:PaginationControlLayoutDefinition.Rows>
                    <telerikPrimitives:PaginationControlLayoutDefinition.Columns>

                        <ColumnDefinition Width="10"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="10"/>
                    </telerikPrimitives:PaginationControlLayoutDefinition.Columns>
                </telerikPrimitives:PaginationControlLayoutDefinition>
            </telerikPrimitives:RadPaginationControl.LayoutDefinition>

            <telerikPrimitives:RadPaginationControl.IndexLabelStyle>
                <Style TargetType="telerikPagination:PaginationIndexLabelControl">
                    <Setter Property="HorizontalAlignment" Value="Left" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="telerikPagination:PaginationIndexLabelControl">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{TemplateBinding CurrentIndexDisplayValue}" FontSize="20" Foreground="#00CCFF"/>
                                    <TextBlock Text=" / " FontSize="18" Foreground="#00CCFF"/>
                                    <TextBlock Text="{TemplateBinding ItemCountDisplayValue}" FontSize="20" Foreground="#00CCFF"/>
                                </StackPanel>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerikPrimitives:RadPaginationControl.IndexLabelStyle>

        </telerikPrimitives:RadPaginationControl>
    </Grid>


    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.5" Mode="Minimized" >
            <shell:ApplicationBarIconButton x:Name="BackButton" IconUri="/icons/appbar.back.rest.png" Text="Zurück" Click="BackButton_Click" />
            <shell:ApplicationBarIconButton x:Name="Details" IconUri="/icons/appbar.information.png" Text="Details" Click="Details_Click" />

            <shell:ApplicationBarIconButton x:Name="NextButton" IconUri="/icons/appbar.next.rest.png" Text="Vor" Click="NextButton_Click" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage> 

returning back to old component everything works ok.
Please advice.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosy Topchiyska
Telerik team
answered on 06 Mar 2015, 09:58 AM
Hello,

Thank you for contacting us.

The problem is that the PanAndZoomImage.MaximumZoom property is of type double and you should assign a single value to it:
<telerikPrimitivesSlideView:PanAndZoomImage MaximumZoom="100" />

Please, let us know if you have further problems.

Regards,
Rosy Topchiyska
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.

 
Tags
SlideView
Asked by
Winify
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or