I have the following snippet of code in an .xaml file:

&lt;TreeView MouseDoubleClick="TreeView_MouseDoubleClick" ItemsSource="{Binding MyList}"&gt;
  &lt;TreeView.ItemContainerStyle&gt;
    &lt;Style TargetType="{x:Type TreeViewItem}"&gt;
      &lt;Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /&gt;
      &lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /&gt;
      &lt;Setter Property="FontWeight" Value="Normal" /&gt;
      &lt;Style.Triggers&gt;
        &lt;Trigger Property="IsSelected" Value="True"&gt;
          &lt;Setter Property="FontWeight" Value="Bold" /&gt;
        &lt;/Trigger&gt;
      &lt;/Style.Triggers&gt;
    &lt;/Style&gt;
  &lt;/TreeView.ItemContainerStyle&gt;


As you can see, when you "MouseDoubleClick" on an item in the TreeView it will execute the code in the code behind...namely...

private void TreeView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
    try
    {
        MessageBox.Show(((TreeViewWithViewModelDemo.LoadOnDemand.HtmlFileViewModel)(((System.Windows.Controls.TreeView)(sender)).SelectedValue)).HtmlFileName);
    }
    catch
    {
    }
}


I'm trying to follow the Model-View-ViewModel Design Pattern and would like to move the implementation of this MouseDoubleClick event away from the View and into the ViewModel.

I understand that if I was using a command I would use {Binding Command="Select"} (or something similar that implements the ICommand interface) but I cannot seem to find the syntax for this particular issue since it is not a command button.

Can someone help me out?

Thanks


Question: Install old version of Wine
Answer: 1 First run apt-get install build-essential.
This will provide you necessary development tools from respective repositary and which are not included in default Ubuntu system.

[2] Download the wine_0.0.20041019-1.3.tar.gz from sourceforge.net 

and extract the file.

[3] Open terminal and enter the following commands:

$cd wine-20041019

$./configure


This should do the trick for you.