Breaking Change in Q1 2013 release with Caliburn Micro

4 posts, 0 answers
  1. Timothy
    Timothy avatar
    8 posts
    Member since:
    Aug 2011

    Posted 01 Mar 2013 Link to this post

    Upgrading to the latest Telerik release results in a NullReferenceException in Caliburn Micro ActionMessage.SetMethodBinding on application load.  The issue is specific to the ExecuteOnLoad event handler Sequence which tries to resolve bindings for the control that is loading. 

    In our case, the control is a RadButton.  The Exception is thrown when the Source property of the ActionExecutionContext in Caliburn Micro is dereferenced.  The Source property is set to the value of the ActionMessage’s AssociatedObject property when the object is constructed a few frames higher on the call stack.
      

    For some reason, the AssociatedObject property is set correctly with the Button controls in the prior telerik release, but not with this latest one.

    Additionally, this problem is specific to Caliburn Micro Actions set up in Styles vs. on the control itself.  IOW this code causes the exception:

            <Style x:Key="FooStyle" TargetType="telerik:RadButton"> 
              <Setter Property="ToolTip" Value="Foo Tip"/>  
              <Setter Property="cal:Message.Attach" Value="[Click]=[Foo]"/> 
            </Style>
            <telerik:RadButton x:Name="_fooButton" Style="{StaticResource FooStyle}"/> 
    
    While this code does not
            <Style x:Key="FooStyle" TargetType="telerik:RadButton">
              <Setter Property="ToolTip" Value="Foo Tip"/>  
            </Style>
            <telerik:RadButton x:Name="_fooButton" 
                               Style="{StaticResource FooStyle}" 
                              cal:Message.Attach = "[Click]=[Foo]"/> 

    Again, setting the Message.Attach property in a style worked fine in the last Telerik release.  It causes an exception in this latest release.


    We have many buttons in our application that are styled like this and it will be a large effort to convert them as a workaround in order to use the latest Telerik controls.  Before we do so, we’d like to know what changed and whether there is a less invasive workaround.

  2. Timothy
    Timothy avatar
    8 posts
    Member since:
    Aug 2011

    Posted 01 Mar 2013 Link to this post

    While waiting for an answer, I went ahead and started changing styles as shown in the original post.  I got enough of them changed over to get my application to load and quickly saw that the REAL PROBLEM is that none of the styles are being applied - not just the CM properties needed for method binding.

    I'm currently looking at the way we compose toolbars to see what might cause this to occur, but it's definitely NOT a Caliburn Micro problem.

    Any thoughts on what changed in the latest release that might negatively affect the application of styles to RadButtons would be appreciated!
  3. UI for WPF is Visual Studio 2017 Ready
  4. Timothy
    Timothy avatar
    8 posts
    Member since:
    Aug 2011

    Posted 04 Mar 2013 Link to this post

    After more investigation, it's obvious that this is a problem with the latest RadToolbar.  I created a new thread in that specific forum.  You can find it here: http://www.telerik.com/community/forums/wpf/toolbar/toobar-button-properties-are-not-being-set-in-q1-2013-release.aspx

  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 05 Mar 2013 Link to this post

    Hello Timothy,

    Thank you for your detailed report. As we've already notified you, we logged this as a bug. In case anyone else encounters the same issue, you can track the task progress from our PITS.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top