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

RadRadialGauge in RadTileView's content template causes SyncFlush[ UCEERR_RENDERTHREADFAILURE (Exception from HRESULT: 0x88980406) ]

2 Answers 385 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Murali
Top achievements
Rank 1
Murali asked on 29 May 2013, 06:02 PM
I am seeing SynFlush issue when I embed RadialGauge inside the RadTileView.ContentTemplate, which is RadFluidContentControl.LargeContent.  Pasted the XAML below.

Question:
Is this illegal use of RadialGague?  If not, is there a way to get around this issue somehow?

The Failure:
UCEERR_RENDERTHREADFAILURE (Exception from HRESULT: 0x88980406)
   at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()

System.Runtime.InteropServices.COMException occurred
  HResult=-2003303418
  Message=UCEERR_RENDERTHREADFAILURE (Exception from HRESULT: 0x88980406)
  Source=PresentationCore
  ErrorCode=-2003303418
  StackTrace:
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
  InnerException:
-----------------------------

Scenario:
<UserControl x:Class="TelerikTest.DeviceList"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:tileview="clr-namespace:Telerik.Windows.Controls.TileView;assembly=Telerik.Windows.Controls.Navigation">
    <UserControl.Resources>
        <SolidColorBrush x:Key="AccentBrush" Color="White"/>
 
        <Style x:Key="TileItemHeaderStyle" TargetType="tileview:TileViewItemHeader">
            <Setter Property="Foreground" Value="#FFFFFF" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="FontFamily" Value="Segoe UI" />
        </Style>
        <Style TargetType="telerik:RadTileViewItem">
            <Setter Property="Padding" Value="3" />
            <Setter Property="BorderBrush" Value="Transparent" />
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="HeaderStyle" Value="{StaticResource TileItemHeaderStyle}" />
        </Style>
        <Style TargetType="telerik:RadTileView" >
            <Setter Property="PreservePositionWhenMaximized" Value="True" />
            <Setter Property="telerik:TileViewPanel.IsVirtualized" Value="True" />
            <Setter Property="IsAutoScrollingEnabled" Value="True" />
            <Setter Property="TileStateChangeTrigger" Value="SingleClick" />
            <Setter Property="MinimizedColumnWidth" Value="308" />
            <Setter Property="MinimizedRowHeight" Value="193" />
            <Setter Property="RowHeight" Value="187" />
            <Setter Property="ColumnWidth" Value="277" />
            <Setter Property="ColumnsCount" Value="4" />
        </Style>
        <DataTemplate x:Key="contentTemplate">
            <telerik:RadFluidContentControl ContentChangeMode="Manual"
                                            State="Normal"
                                            TransitionDuration="0:0:.5">
                <telerik:RadFluidContentControl.Content>
                    <Border Background="Black">
                        <Grid Margin="20 10">
                            <StackPanel>
                                <TextBlock Margin="0 0 0 5"
                                           FontFamily="Segoe UI"
                                           FontSize="24"
                                           FontWeight="Light"
                                           Foreground="#fff"
                                           Text="Duration" />
                                <TextBlock FontSize="14"
                                           Text="{Binding Duration}" />
                                <Border Height="2"
                                        Margin="0 5"
                                        />
                                <TextBlock Margin="0 0 0 5"
                                           FontFamily="Segoe UI"
                                           FontSize="24"
                                           FontWeight="Light"
                                           Foreground="#fff"
                                           Text="Price" />
                                <TextBlock FontSize="14"
                                           Text="{Binding Price}" />
                            </StackPanel>
                            <!--<Image HorizontalAlignment="Right"
                                   VerticalAlignment="Bottom"
                                   Source="{Binding Icon}"
                                   Stretch="None" />-->
                        </Grid>
                    </Border>
                </telerik:RadFluidContentControl.Content>
                <telerik:RadFluidContentControl.LargeContent>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <telerik:RadRadialGauge x:Name="radialGauge" Height="100" Width="100">
                            <telerik:RadialScale Name="scale"
                                     LabelRotationMode="None"
                                     IsInteractive="True"   
                                     MajorTickOffset="-0.015*"
                                     MiddleTickOffset="-0.015*"
                                     MinorTickOffset="-0.015*">
                                <telerik:RadialScale.Ranges>
                                    <telerik:GaugeRange x:Name="range1"
                                            Min="0" Max="20"
                                            StartWidth="0.015"
                                            EndWidth="0.015"
                                            Background="#FF1E8D00"  />
                                    <telerik:GaugeRange x:Name="range2"
                                            Min="20" Max="80"
                                            StartWidth="0.015"
                                            EndWidth="0.015"
                                            Background="#FF000000" />
                                    <telerik:GaugeRange x:Name="range3"
                                            Min="80" Max="100"
                                            StartWidth="0.015"
                                            EndWidth="0.015"
                                            Background="#FFE50000" />
                                </telerik:RadialScale.Ranges>
                                <telerik:RadialScale.Indicators>
                                    <telerik:BarIndicator x:Name="radialBar"
                                              Value="80"
                                              telerik:ScaleObject.Location="Inside"
                                              telerik:ScaleObject.Offset="0.25*" />
                                    <telerik:RadialScaleMarker Name="marker"
                                        IsAnimated="True"
                                        Duration="0:0:1"
                                        telerik:ScaleObject.Offset="-0.015*"
                                        Value="25" />
                                    <telerik:Needle Value="50" />
                                    <telerik:Pinpoint />
                                </telerik:RadialScale.Indicators>
                            </telerik:RadialScale>
                        </telerik:RadRadialGauge>
                    </Grid>
                </telerik:RadFluidContentControl.LargeContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>
        <DataTemplate x:Key="headerTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Destination}" />
                <TextBlock Text=" Trip" />
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
     
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
 
        <telerik:RadTileView Grid.Column="0"
                            ContentTemplate="{StaticResource contentTemplate}"
                            IsItemDraggingEnabled="{Binding ElementName=IsItemDraggingEnabledOption,
                                                            Path=IsChecked}"
                            ItemsSource="{Binding Items}"
                            ItemTemplate="{StaticResource headerTemplate}"
                            MaximizeMode="{Binding ElementName=MaximizeModeOption,
                                                Path=SelectedItem}"
                            PreservePositionWhenMaximized="{Binding ElementName=PreservePositionWhenMaximizedOption,
                                                                    Path=IsChecked}"
                            TileStateChanged="tileView1_TileStateChanged"
                            TileStateChangeTrigger="{Binding ElementName=StateChangeOption,
                                                            Path=SelectedItem}" />
    </Grid>
</UserControl>
 

 

2 Answers, 1 is accepted

Sort by
0
Murali
Top achievements
Rank 1
answered on 30 May 2013, 05:55 AM
Posting back with an update to share the solution:
I found, the non-zero value set on "TransitionDuration" of the content control of TileView is causing this.  Right now, I have everything working just as expected but, not too sure I am just lucked out by avoiding that .5 sec of transition or it is really fixed, I do not have enough time at hand to verify but, if you run in to this issue - something worth verifying.
0
Andrey
Telerik team
answered on 31 May 2013, 10:35 AM
Hello Murali,

Thank you for the feedback.

I was able to reproduce the problem using the code you sent. The problem occurs when the gauge control contains a scale which is interactive. In this case when it is used inside the RadFluidContentControl.LargeContent then it causes the issue. I have created a PITS item for this bug. You can track it using the following link:
http://www.telerik.com/support/pits.aspx#/public/wpf/15091

Regards,
Andrey Murzov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Gauges
Asked by
Murali
Top achievements
Rank 1
Answers by
Murali
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or