Hi,
I am trying to create a menu system which changes the content template for a panel AFTER the panel has been closed by a Visual State change but before the panel is re-opened (think of a slide in/out filter). I was hoping to achieve this using a combination of data triggers but am having no joy :( Some code has been ommited for brevity but my trigger setup looks as follows:
<ContentControl x:Name="contentControl" Content="{Binding SelectedThing}"
DataContext="{Binding}" Width="200">
<ContentControl.ContentTemplate>
<DataTemplate>
<ContentControl Name="cc"
Content="{Binding}" />
<DataTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Value="People"
Binding="{Binding Path=Name}">
</Condition>
<Condition Value="0"
Binding="{Binding ElementName=contentControl,Path=Width}">
</Condition>
</MultiDataTrigger.Conditions>
<Setter TargetName="cc"
Property="ContentTemplate"
Value="{StaticResource PeopleTemplate}" />
</MultiDataTrigger>
....
The trigger changes the template correctly when I omit the binding on contentControl width but I can't determine why (the width is animated via a change in visual state)?
Any ideas?
Thanks