Most of my tiles are set up via the XAML, as follows:
<igTiles:Tile x:Name="PrimaryTile"
Header="Primary Library">
<igTiles:Tile.ContentTemplateMinimizedExpanded>
<DataTemplate x:Name="PriMinExp">
<local:PrimaryWpfUsrCtrlThumb/>
</DataTemplate>
</igTiles:Tile.ContentTemplateMinimizedExpanded>
</igTiles:Tile>
What is the equivalent for a tile that I need to create in code-behind. So far, I have:
myTile=new Tile();
myTile.Header="My Tile";
But how do I set the ContentTemplateMinimizedExpanded for this? Basically I am just wanting different content (in this case a user control) in whenthe state is minimized expanded. While I'm at it, how do i set MinimizedExpanded Tile Constraints (ex-MaxHeight) in code behind. I tried:
myTile.ConstraintsMinimizedExpanded.MaxHeight=150 to no avail
.
treehan said:But how do I set the ContentTemplateMinimizedExpanded for this?
DataTemplate dt = new DataTemplate();var fef = new FrameworkElementFactory(typeof(UserControl));dt.VisualTree = fef;
treehan said: While I'm at it, how do i set MinimizedExpanded Tile Constraints (ex-MaxHeight) in code behind. I tried: myTile.ConstraintsMinimizedExpanded.MaxHeight=150 to no avail
Tile tile = new Tile();TileConstraints tc = new TileConstraints();tc.MaxHeight = 150;tile.Constraints = tc;