WPF DataTemplate Trigger set a property in a different DataTemplate

Posted by Burt on Stack Overflow See other posts from Stack Overflow or by Burt
Published on 2010-05-22T23:15:10Z Indexed on 2010/05/22 23:20 UTC
Read the original article Hit count: 928

Filed under:
|

I have 2 DataTemplates (A & B). A contains an expander and the expander's HeaderTemplate is pointed at another DataTemplate (B).

DataTemplate B is shown below:

    <DataTemplate x:Key="ProjectExpanderHeader">
        <Border CornerRadius="2,2,0,0" 
                Background="{StaticResource ItemGradient}"   
                HorizontalAlignment="{Binding HorizontalAlignment,
                                              RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}},
                                              Mode=OneWayToSource}">
            <local:ItemContentsUserControl Height="30"/>
        </Border>
    </DataTemplate>

Is it possible to set the CornerRadius of B's Border when the IsExpanded property of A's Expander is set to true?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about Silverlight