title: Silverlight ChangePropertyAction on Button control not working
body: <p>Out of the box if you crank up Blend put a button on a grid and set a couple of ChangeProeprtyActions on it ... will fail with an error message.</p>
  
  <pre><code>&lt;UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
  x:Class="SL4_Button_States.MainPage"
  Width="640" Height="480"&gt;
  
  &lt;Grid x:Name="LayoutRoot" Background="White"&gt;
      &lt;Button x:Name="button" Content="Button" Height="39" Margin="68,42,299,0" VerticalAlignment="Top"&gt;
          &lt;i:Interaction.Triggers&gt;
              &lt;i:EventTrigger&gt;
                  &lt;ei:ChangePropertyAction PropertyName="Content" Value="Button is now loaded!" TargetObject="{Binding ElementName=button}"/&gt;
              &lt;/i:EventTrigger&gt;
              &lt;i:EventTrigger EventName="Click"&gt;
                  &lt;ei:ChangePropertyAction PropertyName="Content" Value="temporary"/&gt;
              &lt;/i:EventTrigger&gt;
          &lt;/i:Interaction.Triggers&gt;
      &lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>The error message is this:</p>
  
  <pre><code>    Webpage error details
  
  Message: Unhandled Error in Silverlight Application The type 'Object' was not found. [Line: 2 Position: 10]   at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)
     at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)
     at Microsoft.Expression.Interactivity.TypeConverterHelper.ExtendedStringConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
     at Microsoft.Expression.Interactivity.Core.ChangePropertyAction.Invoke(Object parameter)
     at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
     at System.Windows.Interactivity.EventTriggerBase.OnEvent(EventArgs eventArgs)
     at System.Windows.Interactivity.EventTriggerBase.OnEventImpl(Object sender, EventArgs eventArgs)
     at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
     at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
  Line: 1
  Char: 1
  Code: 0
  URI: http://localhost:62193/Silverlight.js
  </code></pre>
  
  <p>If you add a ChangePropertyAction on a TextBlock ... works fine:</p>
  
  <pre><code>&lt;TextBlock Height="20" Margin="207,132,138,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"&gt;
          &lt;i:Interaction.Triggers&gt;
              &lt;i:EventTrigger EventName="MouseLeftButtonDown"&gt;
                  &lt;ei:ChangePropertyAction PropertyName="Text" Value="Mouse Left BUtton Down"/&gt;
              &lt;/i:EventTrigger&gt;
          &lt;/i:Interaction.Triggers&gt;
      &lt;/TextBlock&gt;
  </code></pre>
  
  <p>If you have any idea why this happens please enlighten me ... if there is another/better way of doing this, other than states please let me know.</p>
  
  <p>Thanks.</p>