<ListView x:Name="lstProductionOrders">
<ListView.View>
<GridView>
<GridViewColumn Header="Production Order:"/>
...
I’ve set the fontsize on the grid, using textelement, I’ve set it on the listview, the columnheader, through styles, through styles using BasedOn. I even put in a brand new test window that had no other code in it but the default code and a listview created the same way above. Using all of the above, the font changes in design-time but not in run-time.
I’ve only got about 6 months of WPF/XAML experience, so I may be looking for the wrong thing. Is there some kind of global setting for fontsize or anything anyone can think of that would be causing this to be overridden.
For the record, I with the test window, there are no base classes.
———-EDIT———-
This was the source of the problem in App. xaml
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="Times New Roman"/>
<Setter Property="FontSize" Value="20"/>
</Style>
This sounds a lot like you have an implicit style for GridViewColumn that overwrites changes you made locally.
At design time, that implicit style is not taken into account (could be for various reasons), but at runtime it is, and you get that strange behavior.
I would start by looking into App.xaml’s Resources section, then move upwards until I reach the control I care about.
Addition: implicit styles:
If you ever want to define an implicit style locally without overwriting another implicit style set higher up the chain, you can do this:
It will inherit the implicit style in place and add changes for the local UserControl.