Hello,
I want to create a xamTileManager with Tile items in a different xaml file.
My VM add some properties that I use in the manager :
<ig:XamTileManager Name="xamTilesControl1" Margin="10,0,0,0" MaximizedTileLimit="3" DataContext="{Binding ResultGrid}"> <ig:XamTileManager.NormalModeSettings> <ig:NormalModeSettings TileLayoutOrder="HorizontalVariable" HorizontalTileAreaAlignment="Stretch" VerticalTileAreaAlignment="Stretch" AllowTileDragging="Slide" AllowTileSizing="Individual"> <ig:NormalModeSettings.TileConstraints> <ig:TileConstraints MinWidth="200" MinHeight="200" /> </ig:NormalModeSettings.TileConstraints> </ig:NormalModeSettings> </ig:XamTileManager.NormalModeSettings> <ig:XamTileManager.MaximizedModeSettings> <ig:MaximizedModeSettings AllowTileDragging="No" ShowTileAreaSplitter="False" ShowAllMinimizedTiles="True" MinimizedTileExpansionMode="AllowOne" VerticalTileAreaAlignment="Top" MaximizedTileLayoutOrder="HorizontalWithLastTileFill"> <ig:MaximizedModeSettings.MaximizedTileConstraints> <ig:TileConstraints MaxHeight="300" MaxWidth="450" /> </ig:MaximizedModeSettings.MaximizedTileConstraints> <ig:MaximizedModeSettings.MinimizedTileConstraints> <ig:TileConstraints MinWidth="150" MinHeight="50" /> </ig:MaximizedModeSettings.MinimizedTileConstraints> <ig:MaximizedModeSettings.MinimizedExpandedTileConstraints> <ig:TileConstraints MinWidth="150" MinHeight="100" /> </ig:MaximizedModeSettings.MinimizedExpandedTileConstraints> </ig:MaximizedModeSettings> </ig:XamTileManager.MaximizedModeSettings> <v:ResultGridItemView DataContext="{Binding UpperLeft}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" /> <v:ResultGridItemView DataContext="{Binding UpperRight}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" /> <v:ResultGridItemView DataContext="{Binding LowerLeft}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" /> <v:ResultGridItemView DataContext="{Binding LowerRight}" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" /> <!--<ig:XamTile Header="IntensityPlot" Content="{Binding ResultGrid.UpperRight}" Visibility="{Binding ResultGrid.UpperRight.IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" IsMaximized="True"> <ig:XamTile.ContentTemplate> <DataTemplate> <v:ResultGridItemView/> </DataTemplate> </ig:XamTile.ContentTemplate> </ig:XamTile>--> </ig:XamTileManager>
Here is the style of each item :
<ig:XamTile Header="Title" Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibility}, ConverterParameter=Collapsed}" Content="{Binding Content}" IsMaximized="True"> <ig:XamTile.ContentTemplate> <DataTemplate> <ContentPresenter ContentTemplateSelector="{StaticResource ResultNodeSelector}" Margin = "4,0,4,4"/> </DataTemplate> </ig:XamTile.ContentTemplate> </ig:XamTile>
I attached the style of my manager and the picture of the result.
Could you help me and prevent this inception ?
Regards
Hi teamtim,
The XamTileManager is going to wrap each of your ResultGridItemView elements inside its own XamTile element. So I want to say that your screenshot is expected. I don't really know what the issue is in the screenshot though so I can't really say for sure. What is the behavior that you are expecting?
I want one XamTile by element and not a XamTile inside.
I mean that each element will be with the same style, here, the title is only visible inside the tile.
A set the context of the resultItem, so the tile will get this and set the title and datas to the right place.
The tile have the expand button, that I force in the style but not inside.
So what is the solution to put the title and the content to the right area ?