title: How to use a WPF "behavior" in XAML?
body: <p>I've got an application, written by my predecessor, which uses WPF, but I'm really not very familiar with it.</p>
  
  <p>I've had to take a DLL he had compiled, fetch the source code from <a href="http://gallery.expression.microsoft.com/BusyIndicator" rel="nofollow">this webpage</a> and convert it to VB, because the compiled DLL, which had worked on desktop installations in the past, refused to work on our terminal servers.</p>
  
  <p>So, I have taken the C# code, and converted the </p>
  
  <pre><code>public static class BusyIndicatorBehavior
  </code></pre>
  
  <p>to </p>
  
  <pre><code>Public Module BusyIndicatorBehavior
  </code></pre>
  
  <p>I have removed the top-level namespace (namespace ScrumSprintMonitor.UI.Wpf.Behaviors) because I really don't know what it's supposed to represent and now, frankly, I have no idea how to reference this in the XAML code I have.</p>
  
  <p>The existing code is as follows:</p>
  
  <pre><code>&lt;Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="MainWindow"
  x:Name="Window"
  Title="{Binding Path=WindowTitle}"
  UseLayoutRounding="True"
  
  xmlns:l="clr-namespace:myAppName"
  xmlns:b="clr-namespace:BusyIndicator;assembly=BusyIndicator" WindowState="Maximized"&gt;
  
  &lt;Window.Resources&gt;
      &lt;ResourceDictionary Source="ResourceDictionary.xaml" /&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid x:Name="LayoutRoot"&gt;
      &lt;Grid.Background&gt;
          &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
              &lt;GradientStop Color="#FF8B8B8B" Offset="0"/&gt;
              &lt;GradientStop Color="#FF484848" Offset="1"/&gt;
          &lt;/LinearGradientBrush&gt;
      &lt;/Grid.Background&gt;
      &lt;Grid&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="Auto" /&gt;
              &lt;ColumnDefinition Width="*" /&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Grid Grid.Column="0" x:Name="grdFolder" b:BusyIndicatorBehavior.BusyState="{Binding Path=BusyState}"&gt;
  </code></pre>
  
  <p>As you can see, the previously-working DLL was called "BusyIndicator.DLL", is referenced with the namespace "b", and b is then made into a property of Grid. Somehow. Magically.</p>
  
  <p>Can someone take a guess as to how I can reference the "BusyIndicator" code I've got now from the existing project? I realise I've probably left out a load of important information, but I'm running pretty clueless, here.</p>