Visibility of RadRibbonButton

4 posts, 0 answers
  1. jbaird
    jbaird avatar
    19 posts
    Member since:
    Jul 2012

    Posted 09 Jan 2013 Link to this post

    I have the following button defined in a ribbon view:

     

     

     

     

     

     

    <bfgs:bDataPage.Resources>

     

     

     

     

        <telerik:BooleanToVisibilityConverter x:Key="BtvConverter" />

     

     

     

     

    </bfgs:bDataPage.Resources>

     

     

     

     


    <

     

     

    trb:RadRibbonButton

     

     

     

     

        x:Name="TableButton"

     

     

     

        LargeImage="/Bowne.Framework.GUI.Silverlight;component/Media/Table32x32.png"

     

     

     

        Click="TableButtonClick"

     

     

     

        Visibility="{Binding IsTableButtonVisible, Converter={StaticResource BtvConverter}, Mode=TwoWay}"

     

     

     

        Size="Large"

     

     

     

        Text="Table" />

     


    In the ViewModel:

    private

     

     

    const string IsTableButtonVisiblePropertyName = "IsTableButtonVisible";

     

     

     

    private bool _isTableButtonVisible;

     

     

     

    public bool IsTableButtonVisible

     

    {

     

     

        get

     

        {

     

     

            return _isTableButtonVisible;

     

        }

     

     

        set

     

        {

            _isTableButtonVisible =

     

    value;

     

     

     

            this.OnPropertyChanged(IsTableButtonVisiblePropertyName);

     

        }

    }


    The button still shows regardless of the setting of this property.  Can you tell me what I'm doing wrong?

    Thanks...

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 11 Jan 2013 Link to this post

    Hello John,

    I tested your scenario on our side with our latest official release 2012 Q3 SP1 (2012.3.1129) and it seems that the code works as expected. Can you take a look at the attached project and let me know if I missed something.

    All the best,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. jbaird
    jbaird avatar
    19 posts
    Member since:
    Jul 2012

    Posted 11 Jan 2013 Link to this post

    Sorry, but I didn't post the version.  We are using 2011.1.419.1040.  We have been unable to upgrade to the latest because we are still using Silverlight 4.
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 16 Jan 2013 Link to this post

    Hi John,

    I tested the same approach using the 2011.1.419.1040 and I still were unable to detect any issues. Can you please make sure that the issue isn't caused by your custom implementation? You can compare our approach (implemented in the previously attached solution) with your real-life scenario implementation to see if there is something missing.

    Also, please note that since Q3 2012 we officially do not support Silverlight 4 and we strongly encourage our customers to migrate their solutions to Silverlight 5 as soon as possible. This will give you the chance to work with our latest release and take advantage of the new and improved ribbon control - RadRibbonView. Moreover, this will allow you to take full advantage of all new features and fixes implemented in our controls.

    Regards,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top