Border of disabled TextBox in Office2013 theme

10 posts, 0 answers
  1. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 09 Apr 2014 Link to this post

    Hello,
    When a TextBox is disabled in the Office2013 theme, the border is no more visible.
    Patrick
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Apr 2014 Link to this post

    Hi Patrick,


    I've tried to replicate the same behavior, however to no avail. 
    May you verify whether you have merged Office2013ResourceDictionary in App.xaml?:

    <Application x:Class="TextBoxDisabled.App"
                  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 StartupUri="MainWindow.xaml">
        <Application.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <telerik:Office2013ResourceDictionary/>
                    <ResourceDictionary Source="System.Windows.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Application.Resources>
    </Application>


    I'm attaching you small sample demo, that I used for testing purposes. 
    Would it be possible to take a look at the attachment and let us know how it differs from yours? 

    Any additional version about the version you used will be highly appreciated, as well. 


    Regards,
    Vanya Pavlova
    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 09 Apr 2014 in reply to Vanya Pavlova Link to this post

    Hello Vanya,
    I can not reproduce it with your example, but I see it in my application.
    The main differences are that my control is inside a document pane that is part of a docking, that the enable/disable is made using a button and that the data context is changed by code after the control is displayed.
    I will make tests to look at the condition that makes the problem and add a new reply.
    Patrick
  5. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 10 Apr 2014 in reply to Vanya Pavlova Link to this post

    Hello Vanya,
    here is a test case that reproduce the problem.
    The main difference is that I have loaded the resources as specified in the documentation:
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    What is the purpose of the <telerik:Office2013ResourceDictionary/> resource specification?
    It is mentionned nowhere in the documentation!!!!

    Even adding it to my test case, the border is not displayed!
    But the border is displayed when you click on the TextBox.

    Patrick
  6. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 10 Apr 2014 in reply to Patrick Link to this post

    Vanya,
    just something that could be important: you were using version 2014.1.224.45 of the Telerik controls and I am using version 2014.1.331.45.
    I will create a support ticket for the test case.
    Patrick
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 10 Apr 2014 Link to this post

    Hello Patrick,


    As a kind of follow up, I've updated the project you have already sent. Indeed, there is a difference between these versions. Actually we are talking about the IsReadOnly state of the TextBox, not about the disabled one. Looking back, we had an internal discussion and designer's review of this theme and the IsReadOnly state of the TextBox was changed, following the design guideline. When the TextBox enters this state the outer border of this element should not be visible to the end-user and that should be the expected behavior. 



    Regards,
    Vanya Pavlova
    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.

     
  8. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 10 Apr 2014 in reply to Vanya Pavlova Link to this post

    Vanya,
    the result of this change is not good: the TextBox control has no border, but other controls, such as DateTimePicker or ComboBox, that must be disabled, have a border. That doesn't look good.
    Patrick
  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 14 Apr 2014 Link to this post

    Hi Patrick,


    We had the same discussion on that matter. If you remove the outer Border of RadDateTimePicker and RadComboBox in ReadOnly state it's strange, indeed.
    We finally decided to keep the behavior, which is by design. 
    Any attempt to revert back these changes could lead to a potential breaking change, that we want to avoid. 

    Currently, if you need this Border, I may suggest you to modify the template of TextBox against Office2013
    theme 
    and remove the animation that resets the BorderThickness of the root container. 
    Hope this helps. 


    Regards,
    Vanya Pavlova
    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.

     
  10. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 17 Apr 2014 in reply to Vanya Pavlova Link to this post

    Hello Vanya,
    look at this screen shot to see how it looks bad when you mix a read-only TextBox to other controls.
    The TextBox is read-only, because this lets the user select the content to copy it.
    Patrick
  11. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 21 Apr 2014 Link to this post

    Hello Patrick,



    Thank you for the followup. I will forward your feedback to our developers for further investigation. 


    Regards,
    Vanya Pavlova
    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