I've been using White for about a week now in the construction of a test harness for a WPF application. My initial impression is that White is going to be extremely useful to myself and my colleagues.
I've run into a couple of situations where the standard White UI items aren't quite doing the job and I'm not sure of the best way to deal with this. The main one is the ListView:
We have a number of lists in our application that use DataTemplate blocks to format the columns of a WPF GridView control. Unfortunatly the White ListView expects a "cell" to be of ControlType.Text and our grids consist of ControlType.Custom elements
the labels or other elements within them.
Therefore we have 0 cells and are unable to retrieve the contents. Ideally the List would consider all child elements of any type to be the cell, the text of the cell being either the name (if it exists) or any text element within it. With cell being a WPFUIITem
getting any other elements would then be easy.
I was hoping that there would be a way to easily override this behaviour or supply some custom factory implementation but this doesn't seem possible unless I'm missing something. Is there a better way to do this? I think I'm correct in saying that you can't
override one of the White UIItems and then use it in methods such as myWindow.Get<CustomListView>(...) When I tried this I received a null reference exception somewhere in White.Core.