How to handle wpf visibility=hidden in framework

2 posts, 0 answers
  1. cmmdmx
    cmmdmx avatar
    4 posts
    Member since:
    Nov 2015

    Posted 19 Feb 2016 Link to this post


    I have a problem: I want to check in a coded UI test, whether elements are visible or not. In WPF, they are declared as visibility=hidden, so a user couldn't see them. But the framework handles those elements as silverlight FrameworkElement. Silverlight only knows visibility=visible or collapsed. hidden is read as visible. Any idea how to fix this?


    Thanks for help,


  2. Elena Tsvetkova
    Elena Tsvetkova avatar
    938 posts

    Posted 22 Feb 2016 Link to this post

    Hello Max,

    Thanks for contacting us. 

    That is one of the discrepancies between Silverlight and WPF. WPF visibility declarations could be visible, hidden and collapsed. As you mentioned these correspond in Silverlight to visible and collapsed. So what is required would be to change the visibility to collapsed so that it would be recognizable for your framework as well. 

    Let me know if that helps you. 

    Elena Tsvetkova
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top