I have an WPF application with this XAML...
<ListView
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
ItemsSource="{Binding HTMLControlNames}">
<ListView.ItemTemplate>
<DataTemplate>
<Button Content="{Binding Name}"></Button>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
The bindings are correct and there is data in the ObservableCollection property that implements INPC.
I added the Expression Dark Theme which is also working but this is the output from the markup above:
The buttons are there, they just aren't showing the text... BTW the number of buttons is equal to the count of items in the collection.
Here's the property in the ViewModel, single stepping shows me there are items (the proper ones) in the collection.
public ObservableCollection<ControlName> HTMLControlNames
{
get { return _HTMLControlNames; }
set
{
_HTMLControlNames = value;
PropChanged("HTMLControlNames");
}
}
Lastly the ControlName Class:
public class ControlName
{
public string Name { get; set; }
}
If I don't use ExpressionDark.xaml the content shows up!
Here's more information: Top part of the control shows up ok... If I don't use DataTemplate as in the top half of this control the buttons are fine.
Here's the default Control Template (just a grid with a content presenter)..