Error with UXScrollViewer

3 replies. Last post: December 7, 2011 2:28 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi

Please see attached screen shots.

I have a UXscrollerview within a listbox/data template.  When I use the top and bottom scoller buttons the text scrolls okay - when I drag the scroller bar I first get a new row on the list box (see screenshot) and then if I keep dragging I get runtime error - can you please advise

I have enclosed XAML

<Intersoft:UXDialogBox 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:Intersoft="http://intersoft.clientui.com/schemas"
    x:Class="Abracadabra.Views.MyStuff.Reviews" 
	xmlns:ViewModels="clr-namespace:Abracadabra.ViewModels"
     x:Name="ReviewsPage" 
    FontFamily="../Fonts/Fonts.zip#Myriad Pro" FontSize="14"
    
    Header="{Binding SelectedItem.Title}" ContentMargin="0" d:DesignHeight="600" d:DesignWidth="896" Width="800" Height="600"   >
    <Intersoft:UXDialogBox.Resources>
        <ViewModels:ReviewsViewModel x:Key="ReviewVM"/>
        <DataTemplate x:Key="EnquiryViewTemplate">
            <Grid Height="130" Margin="5,3,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="220"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="0" HorizontalAlignment="Left" Orientation="Vertical" VerticalAlignment="Top" Margin="5,7,0,0">
                    <TextBlock TextWrapping="Wrap" Text="{Binding FullNameClass}" Width="215" FontSize="12" Margin="0,3,0,5" HorizontalAlignment="Left"/>
                    <TextBlock  Text="{Binding ReviewDateFormatted}"  Width="215" FontSize="12" Margin="0,3,0,5" HorizontalAlignment="Left" />
                    <Intersoft:UXRating Maximum="100" Minimum="0" Value="{Binding Score, Mode=OneWay}"   Margin="8" Background="Transparent" ToolTipVisibility="Visible" PrecisionInterval="1" PrecisionMode="Full" ItemCount="5" />
                </StackPanel>
                <Border Grid.Column="1" HorizontalAlignment="Left" Margin="10,5,10,10" VerticalAlignment="Top"  Padding="10" CornerRadius="8" Background="#7FEBEBEB">
                        <Intersoft:UXScrollViewer >
                        <TextBlock TextWrapping="Wrap" Text="{Binding ReviewNotes}" FontSize="12"  Width="450" Margin="0,3"/>
                        </Intersoft:UXScrollViewer>
                </Border>
                <Intersoft:UXSeparator VerticalAlignment="Bottom" Grid.ColumnSpan="2" Background="#FFD8D8D8"/>
            </Grid>
        </DataTemplate>
    </Intersoft:UXDialogBox.Resources>
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource ReviewVM}}" Width="Auto">
        <Grid.Resources>
            <Intersoft:CommandReference x:Key="AddCommand" Command="{Binding AddCommand}"/>
            <Intersoft:CommandReference x:Key="EditCommand" Command="{Binding EditCommand}"/>
            <Intersoft:CommandReference x:Key="DeleteCommand" Command="{Binding DeleteCommand}"/>
        </Grid.Resources>
        <Intersoft:CommandManager.InputBindings>
            <Intersoft:InputBindingCollection>
                <Intersoft:KeyBinding Command="{StaticResource AddCommand}" Gesture="Ctrl+Shift+A"/>
                <Intersoft:KeyBinding Command="{StaticResource EditCommand}" Gesture="Ctrl+Shift+E"/>
                <Intersoft:KeyBinding Command="{StaticResource DeleteCommand}" Gesture="Ctrl+Shift+X"/>
            </Intersoft:InputBindingCollection>
        </Intersoft:CommandManager.InputBindings>
        <Intersoft:DockPanel FillChildMode="Custom">
            <Grid Height="106" Margin="0,0,0,0" Intersoft:DockPanel.Dock="Top" Background="#FFB8B0E6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="74"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Intersoft:ContentReflector HorizontalAlignment="Left" VerticalAlignment="Top" ContentHeight="64">
                    <Image Source="{Binding SelectedItem.imgSmall}" />
                </Intersoft:ContentReflector>
                <StackPanel Grid.Column="1" HorizontalAlignment="Left" Orientation="Vertical" VerticalAlignment="Top" Margin="5,7,0,0">
                    <Intersoft:EllipsisText Text="{Binding SelectedItem.Title}" Width="300" FontSize="12" Margin="0,3,0,5" HorizontalContentAlignment="Left"/>
                    <Intersoft:EllipsisText  Text="{Binding SelectedItem.Author}"  Width="300" FontSize="12" Margin="0,3,0,5" HorizontalContentAlignment="Left" />
                </StackPanel>
                <Border Grid.Column="1" HorizontalAlignment="Left" Margin="425,5,10,10" VerticalAlignment="Center" Width="250" Padding="5" CornerRadius="8" Background="#7FEBEBEB">
                    <StackPanel Margin="5,0,0,0">
                        <TextBlock Text="Sort Order:" FontSize="12" ></TextBlock>
                        <Intersoft:UXRadioButton Content="Rating (number of stars)" Margin="20,0,0,0" IsEnabled="{Binding CheckedState, ElementName=uXCheckBox1}" Style="{StaticResource CenteredRadioStyle}"/>
                        <Intersoft:UXRadioButton Content="Date of Review" Margin="20,0,0,0" IsEnabled="{Binding CheckedState, ElementName=uXCheckBox1}" CheckedState="True" Style="{StaticResource CenteredRadioStyle}"/>
                    </StackPanel>
                </Border>
                <Intersoft:UXSeparator VerticalAlignment="Bottom" Grid.ColumnSpan="2" Background="#FFD8D8D8"/>
            </Grid>
            <Intersoft:ContentTransition Intersoft:DockPanel.Dock="Top" Intersoft:DockPanel.IsFillElement="True" PerformTransitionOnLoad="True" TransitionDuration="1.5">
                <StackPanel Orientation="Horizontal">
                    <Intersoft:UXListBox HorizontalAlignment="Left" MinWidth="450" Intersoft:DockPanel.IsFillElement="True" 
                                         ItemsSource="{Binding Model}" ItemTemplate="{StaticResource EnquiryViewTemplate}" 
                                         HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible" 
                                         Name="mainList" SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" 
                                         SelectedIndex="{Binding Path=SelectedIndex, Mode=TwoWay}" AllowReorderItem="True" 
                                         MaxHeight="410" MinHeight="410" Width="780" />
                </StackPanel>
            </Intersoft:ContentTransition>
            <Border BorderBrush="Silver" BorderThickness="0" Intersoft:DockPanel.Dock="Bottom" Height="30" CornerRadius="{Binding ElementName=contactsViewPage, Path=FooterCornerRadius}" Background="#FF2A2A2A">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <TextBlock Foreground="White" Text="{Binding Path=Count}" VerticalAlignment="Center"/>
                    <Intersoft:UXSeparator Orientation="Vertical" Height="16" Width="1" Margin="10,0"/>
                    <TextBlock Foreground="White" Text="{Binding Path=SelectionStatus}" VerticalAlignment="Center" />
                </StackPanel>
            </Border>
        </Intersoft:DockPanel>
    </Grid>
</Intersoft:UXDialogBox>

 Thanks

Richard




All times are GMT -5. The time now is 1:45 PM.
Previous Next