title: Using a properties grid with a tree control
body: <p>I want to create a tree control that when the user clicks on an element in the tree control, a properties grid is populated with its properties.</p>
  
  <p>I've created a tree control as a user control and I'm using Jaime Oliveras' property grid.  I have both on a WPF window but I can't seem to figure out how to make the two communicate with each other.  </p>
  
  <p>The XAML on the Main window is:</p>
  
  <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:advanced="clr-namespace:OptionsStrategyTree.ViewModel"
          xmlns:local="clr-namespace:OptionsStrategyTree.ViewModel"
          xmlns:Controls="clr-namespace:System.Windows.Controls"              
          x:Class="OptionsStrategyTree.MainWindow"
          mc:Ignorable="d"
          Title="MainWindow" Height="400" Width="500"&gt;
      &lt;Grid&gt;
          &lt;local:UserStrategyTree HorizontalAlignment="Left" Margin="18,6,0,13" 
                                  Width="195" Height="340" /&gt;
          &lt;Controls:WpfPropertyGrid x:Name="StrategyTreePropertyGrid" 
                                    HorizontalAlignment="Left" Height="340" Margin="233,6,0,0" 
                                    VerticalAlignment="Top" Width="239"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>I've had this properties grid working nicely when the controls are all on the same XAML window.  But when I've created a tree control as a user control, it's a separate entity in its own XAML space that seems to be isolated from everything else.  Is there any way to connect the two?</p>