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

Header disappearing when moving TileViewItems to another TileView

3 Answers 73 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 14 Jan 2013, 01:22 PM
Hello,

we are using Telerik WPF Controls Version Q2 2011 0920.

We have a scenario where we want to programmatically move TileViewItems from one TileView to another. This is done by removing the item from the RadTileView.Items Collection and adding it to the other in code behind.
The issue is that the header is disappearing if we do that (plain text defined in XAML with HEADER Property) and is doesn't come back if we move the TileViewItem back to the original TileView.

Update: Header-Property is correct after the move but the UI isn't showing anything.

Thanks,

Thomas

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 15 Jan 2013, 05:21 PM
Hello Thomas,
Thank you for the feedback! There really seems to be a bug in the RadTileView and I've logged it in our PITS under the name "The tileViewItem's Header disappears if you move the item from one tileView to another" and it'll be ready for tracking and voting tomorrow the latest.
For now there's a possible workaround - save the header before the change and set it back after that:
if (this.tileViewOne.Items.Count <= 0) return;
 
var tmpItem = this.tileViewOne.Items[0] as RadTileViewItem;
var tmpHeader = tmpItem.Header;
this.tileViewOne.Items.Remove(tmpItem);
this.tileViewTwo.Items.Add(tmpItem);
tmpItem.Header = tmpHeader;
I've updated your telerik account and if you have further questions please feel free to ask.

Kind regards,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Thomas
Top achievements
Rank 1
answered on 16 Jan 2013, 09:37 AM
As stated in my UPDATE the header property is correctly filled with the defined header, but the UI doesn't show it.
If I define the same header in the HEADERTEMPLATE I can see the header, but Bindings etc. are gone.
0
Zarko
Telerik team
answered on 18 Jan 2013, 04:26 PM
Hello Thomas,
I'm sorry for the misunderstanding and could I please ask you to tell us how exactly are you using the RadTileView? Do you use it databinding scenario or with XAML defined items, how do you use the HeaderTemplate and the bindings? It'll be best if you could send us some code snippets or a sample project.
In order for my previous workaround to work you'll have to update it a little bit:
var tmpItem = this.tileViewOne.Items[0] as RadTileViewItem;
var tmpHeader = tmpItem.Header;
this.tileViewOne.Items.Remove(tmpItem);
this.tileViewTwo.Items.Add(tmpItem);
tmpItem.Header = null;
this.Dispatcher.BeginInvoke(new Action(() =>
{
    tmpItem.Header = tmpHeader;
}), System.Windows.Threading.DispatcherPriority.SystemIdle);
Another possible workaround includes custom controlTemplate and I've attached a sample project showing this.
If you need further assistance please feel free to ask.

Regards,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TileView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or