IsEnabled background color

5 posts, 0 answers
  1. Bobby Ross
    Bobby Ross avatar
    18 posts
    Member since:
    Nov 2004

    Posted 08 Nov 2014 Link to this post

    I need to have the Richtextbox display a transparent background and border when IsEnabled is set to true.  After fumbling around for a few hours I am unable to get the control to cooperate.

    Any help would be appreciated.
  2. Bobby Ross
    Bobby Ross avatar
    18 posts
    Member since:
    Nov 2004

    Posted 08 Nov 2014 Link to this post

    It appears that the opacity is getting set which is causing the control to appear to have a background.  Is there any way to override this?
  3. UI for WPF is Visual Studio 2017 Ready
  4. Todor
    Admin
    Todor avatar
    168 posts

    Posted 10 Nov 2014 Link to this post

    Hi Bobby,

    To achieve different than the default behavior of a control in its visual states, you should override its template. In your case you should edit the RadRichTextBox's Disabled state.

    For your convenience, I've created a sample project which illustrates the desired visual effect with the above described approach. You can find it attached. In addition, I've also left some "NOTE" comments in the App.xaml file, so you can easily see what is changed in the template and compare it to the default RadRichTextBoxStyle. 

    Please note, implicit styles are used in the demo project as this is the theme setting approach which we recommend. More about this topic, you can read in our help article here.

    If you have further questions, I'll be glad to assist you.
     

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Bobby Ross
    Bobby Ross avatar
    18 posts
    Member since:
    Nov 2004

    Posted 10 Nov 2014 in reply to Todor Link to this post

    This is very close, but the example you gave essentially hides the text completely similar to making it invisible instead of transparent.  I would like the content to still display when disabled, but the background to be transparent without border.
  6. Todor
    Admin
    Todor avatar
    168 posts

    Posted 11 Nov 2014 Link to this post

    Hello Bobby,

    Sorry for the misunderstanding. As I mentioned in my previous post, you can achieve different look and behavior of a control than the default by editing its template and applying the desired changes there.

    For your convenience, I've modified the previously sent project with the last desired changes, so you can find it attached.

    I hope this helps.


    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready