Toobar Button Properties are not being set in Q1 2013 release

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

    Posted 04 Mar 2013 Link to this post

    If you have a RadButton in a RadToolbar and the button properties are set in a style, those properties do not get applied at runtime.  If you set the properties directly on the button itself, then they do get set.  This was working before and broke in the latest release.

    Example: 
    <telerik:RadToolBar x:Class="ToolBarTest.View.ToolBars.StandardToolbarView"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         xmlns:Controls="clr-namespace:ToolBarTest.Controls"
                         >
        <telerik:RadToolBar.Resources>
            <Style x:Key="Refresh" TargetType="telerik:RadButton">
                <Setter Property="ToolTip" Value="Refresh Set Via Property"/>
            </Style>
        </telerik:RadToolBar.Resources>
            
        <telerik:RadButton x:Name="Refresh" 
                           Style="{StaticResource Refresh}" 
                           Controls:ImageContentSetter.Source="/ToolBarTest;component/Images/document_refresh.png"
                           />
    </telerik:RadToolBar>
    

    With the above XAML, the Tooltip is NOT SET on the button.

    While here:
    <telerik:RadToolBar x:Class="ToolBarTest.View.ToolBars.StandardToolbarView"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         xmlns:Controls="clr-namespace:ToolBarTest.Controls"
                         >
        <telerik:RadToolBar.Resources>
            <Style x:Key="Refresh" TargetType="telerik:RadButton">
            </Style>
        </telerik:RadToolBar.Resources>
            
        <telerik:RadButton x:Name="Refresh" 
                           Style="{StaticResource Refresh}" 
                           Controls:ImageContentSetter.Source="/ToolBarTest;component/Images/document_refresh.png"
                           ToolTip="Refresh"
                           />
    </telerik:RadToolBar>
    

    The tooltip IS SET on the button.

    This might seem like a minor thing, but we have MANY buttons in our application and they all take advantage of property setting via styles.  There's NO WAY we are going to go change all of our XAML to work around this.  We cannot upgrade to the Q1 2013 release until this is fixed.
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2992 posts

    Posted 05 Mar 2013 Link to this post

    Hi Timothy,

     Indeed, this is a bug in the RadToolBar we have introduced in Q1 2013. We logged it in our PITS where you can track its status. We will do our best to have it fixed for the upcoming internal builds or the SP in the beginning of April the latest. 
    Please excuse us for the inconvenience caused.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Rajaram
    Rajaram avatar
    1 posts
    Member since:
    Jun 2017

    Posted 16 Jun Link to this post

    Can you please let me know if this issue is fixed in the latest version of Telerik? If yes please guide in using style property for my radbutton.

    Thanks

  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2992 posts

    Posted 20 Jun Link to this post

    Hi Rajaram,

    We have prepared sample SDK project for such scenarios. Please check it out - it contains readme file and comments in XAML describing the approach and the resources used. Let us know if you need further assistance.

    RadToolBar: CustomStyleElements SDK Sample GitHub


    Regards,
    Petar Mladenov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top