How to pass other element source

Topics: Actions & Coroutines
Jul 13, 2013 at 7:55 AM
Edited Jul 13, 2013 at 7:57 AM
Hi,

I want after click button pass TreeView source to SearchTreeView event, This method not work.
<Button x:Name="SearchTreeView" Content="Search in TreeView" cal:Message.Attach="[Event Click] = [Action SearchTreeView($source.TreeView)]" />

<TreeView x:Name="TreeView" ItemsSource="{Binding TreeViewSource}"/>
Thanks.
Jul 13, 2013 at 11:51 AM
This Method work, not possible short syntax worked?
        <Button Content="Search in TreeView" Height="34" Width="100">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <cal:ActionMessage MethodName="SearchTreeView">
                        <cal:Parameter Value="{Binding ElementName=TreeView}" />
                    </cal:ActionMessage>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>