Hello,
I am completely new to Silverlight development and have been getting use to infragistics controls. I have a question about using XamTileView. I have binded a few controls and pages to the individual Tile Panels. The issue I'm having is with sizing. When you click on one panel the other panels become a minimized strip. I have set TilePaneSizing = "Both" and MinimizedTilePaneSizing = "True" so they can scale the minimized panes. The result wasn't what I was hoping for though.
My result, I do get the minimized strip. But it crops out the Tile Panes that have more content and also appears to hide the Maximize/Minimize buttons that are part of those minimized panes. Is there a different setting I am suppose to set? Or is there a correct way to approach this?
thanks for any replies,
Kiet
Hello Kiet,
Yes, using a Frame in the UserTemplateMaximized DataTemplate is an option. However, you will have to obtain the Frame from the Content of the pane and specify UriSource that points to your page.
Another option is to add a ContentPresenter in the datatemplate as follows:
<DataTemplate x:Key="UserTemplateMaximized" > <ContentPresenter Content="{Binding}" /> </DataTemplate>
this.Content = new WorkTray();
Let me know if you have any questions with this matter.
Thank you very much Vlad. That works just fine! I do have one quick question related to the datatemplate. How do I load a .xaml user control or xaml page into the maximized tile panel?
For example, I have 4 tile panels.
1) Work Tray
2) Open Tasks
3) Search Tasks
4) Edit Tasks
Depending on which tile panel is selected, I would like to load one of those xaml pages into the maximized tile panel.
Would it be something like this?
case TileState.Maximized: pane.ContentTemplate = this.LayoutRoot.Resources["UserTemplateMaximized"] as DataTemplate; if (pane.Header.ToString() == "Work Tray") { this.Content = "/Work Tray.xaml"; } break;
Or would I have to create a Frame in the panel. And navigate to the file when the tile is maximized?
Thanks for your help Vlad!
You might consider using different data templates when the tile is in minimized, maximized or in normal state. In order to do that you will have to handle the MaximizedStateChanging event and set different ContentTemplate based on the e.NewState.
For more details check these samples in our FeatureBrowser:
http://labs.infragistics.com/silverlight/lobsamples/2010.3/#
-"Data Binding (IList/Enumerable)"
- "Key Templates"
Hope that helps.