This project is read-only.

Transitionals and Bindings

Aug 25, 2010 at 5:23 PM

Hi there,

I'm using the Transitionals library to have an animation between different tabs of a tabControl. Some ofthe tabs contain Textboxes that get their content from an XML file through an XPath-binding. However, if I do so and switch to an "XML-binded tab" there is no content. Reducing the opacity of the tabs showed that when I click the tab, its content is rendered correctly, then the animation is played and as soon as it is finished, the tab is empty. So it seems there's some kind of rerendering going on with the binding getting lost somewhere inbetween (?).


Could anyone give me a pointer on how to fix this problem? Thanks a lot!


Code snippet:

<DataTemplate x:Key="TabTemplate">
    		<transc:TransitionElement Content="{Binding}" UseLayoutRounding="False" AllowDrop="False">
    				<transt:PageTransition Duration="0:0:.8"/><!-- Add ContentTemplate="{StaticResource TabTemplate}" to TabControl to include animation-->
    				<!--<transt:FlipTransition Duration="0:0:.8"/>-->

<TabControl x:Name="tabControl" ContentTemplate="{StaticResource TabTemplate}" Margin="0" TabStripPlacement="Right" Style="{StaticResource testStyle}" RenderTransformOrigin="0.5,0.5">       
            <TabItem x:Name="DetailTab" Style="{StaticResource tabItemStyle}" Header="Details" RenderTransformOrigin="0.5,0.5" Width="25" HorizontalAlignment="Left" Margin="-0.009,0,0,0">
                <Border BorderBrush="{DynamicResource ZellenBorderBrush}" BorderThickness="2,2,0,2" CornerRadius="12, 0, 0, 12" Background="{DynamicResource EdgeBrush}">
                    <Viewbox Margin="5" CacheMode="BitmapCache">
                        <Custom:SurfaceScrollViewer x:Name="surfaceScrollViewer1" PanningMode="VerticalOnly" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden" Width="350" Height="280" FontSize="12">
                            <TextBlock Text="{Binding XPath=/Telefonzellen/Telefonzelle/ZellenText}" TextWrapping="Wrap" FontSize="12" Width="350" Height="280"/>