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

Content disappears after overlapped by other view

6 Answers 97 Views
TileView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 25 Feb 2012, 11:39 AM
Hi telerik,

I placed a usercontrol in contentpresenter of RadTileView as you advised in this thread
instead of Prism region.  Follwing is snippet of xaml in layoutview which has tileview control.
/// resource
 <DataTemplate x:Key="LineContentTemplate">
                <ContentPresenter Content="{Binding View, Mode=OneWay}" />
 </DataTemplate>
 
/// tileview
 <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource popLineCurrentViewModelViewSource}}">
        <telerik:HeaderedContentControl Style="{StaticResource SchFormBaseStyle}">
                <telerik:RadTileView x:Name="lineTagView" ItemsSource="{Binding ChildVM}"
                                 ContentTemplate="{StaticResource LineContentTemplate}"
                                 Style="{StaticResource tileViewStyle}"
                                 MinimizedColumnWidth="300" MinimizedRowHeight="270">

When opened view first time in documenthost of RadDock, everything is fine as attached first image.
However,after open another view over tileview and then return to tileview by tab click,
contents are gone as attached second image.
The code to create usercontrol in viewmodel is as follows which borrowed in your various sample.
private FrameworkElement _view;
     public FrameworkElement View
     {
         get
         {
             SetView();
             DetachFromVisualParent(_view);
             return _view;
         }
     }
 
     protected void DetachFromVisualParent(FrameworkElement visual)
     {
         var parent = System.Windows.Media.VisualTreeHelper.GetParent(visual) as ContentPresenter;
         if (parent != null)
         {
             parent.Content = null;
         }
     }

However, in case dataTemplate has all controls declared in same xaml, it runs fine without disappearing.
I've tried to debug if the view or Itemsource of tileview control changes when tilew view has focus again,
but can't configure and find it. Currently IsVirtualization is set ON, but it was same when changed to  OFF.
What am I missing something ? Pls advise me.

Thank you in advance.

Kang

6 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 29 Feb 2012, 04:10 PM
Hi,
Thank you for the feedback! From your explanation I guess that you've encountered this issue (in the PITS it is about TransitionControl but it's the same with the TabControl). The problem occurs if you have UserControl(s) in the templates and as you've correctly noticed if you place all the XAML in the DataTemplate everything should work ok, so for now this is the best workaround that we know of.
We'll try to fix this issue in some of our next internal releases and if you have more questions please feel free to ask.

Greetings,
Zarko
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Peter
Top achievements
Rank 1
answered on 22 Mar 2012, 03:51 PM
Is there an update on when this will be fixed?  We are seeing the same issue as well.  Thanks.
0
Zarko
Telerik team
answered on 23 Mar 2012, 03:52 PM
Hello,
I'm glad to tell you that this bug should be fixed in our Q1 2012 SP which is scheduled for next week.
If you have more questions please feel free to ask.

All the best,
Zarko
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Peter
Top achievements
Rank 1
answered on 29 Mar 2012, 04:17 PM
This is not fixed for us on version 2012.1.326.1050.  Item headers and Item content disappear when scrolling or maximizing/restoring. It might be a different problem.  I submitted a support ticket (528483) with a sample project attached.  Perhaps we are doing something incorrectly in the way we have structured our docking/tileview markup.  Either way, it would be great to get this fixed as soon as possible.
0
Zarko
Telerik team
answered on 30 Mar 2012, 12:14 PM
Hi Peter,
I'll post the answer from the support ticket here, so that anyone with similar problems may see it:
"In your case the Content and the Header of your items disappear because you've set the IsVirtualizing to True. The virtualization is meant to work when you use business items in your RadTileView and you've bound their properties in the Content/ItemTemplate, but when you're using directly RadTileViewItems you don't need virtualization because you've already created all of the containers (the RadTileViewItems).
I've attached a sample project that uses business items so you could examine it and see that the Header and the Content are not lost.
If you need further questions please feel free to ask."


Greetings,
Zarko
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Peter
Top achievements
Rank 1
answered on 30 Mar 2012, 06:56 PM
It is curious that this setting would cause harm in this case, but the change worked for us.  Thank you!
Tags
TileView
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Zarko
Telerik team
Peter
Top achievements
Rank 1
Share this question
or