Hi,
I currently have a problem applying a bound size to the HeaderCellStyle.FontSize
Our operators have the possibility to set the text size to what they need.
I would like to have it bound like the FontSize for the GridCells in the following code snippet:
FontSize="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type lisaGridControl:LisaGridControl}}, Path=SettingsModel.GeneralSettings.FontSize, Mode=TwoWay}"
The proplem is that I can only find static solutions like:
<
Style
x:Key
=
"GridHeaderCellStyle"
TargetType
=
"{x:Type telerik:GridViewHeaderCell}"
>
<
Setter
Property
=
"Foreground"
Value
=
"Black"
/>
<
Setter
Property
=
"FontSize"
Value
=
"16"
/>
<
Setter
Property
=
"FontWeight"
Value
=
"Normal"
/>
<
Setter
Property
=
"FontStyle"
Value
=
"Normal"
/>
</
Style
>
Additionally my columns are created in code behind and I have no column definition in xaml.
For example the DisplayText for the header is bound as follows:
var bindingHeader =
new
Binding(
"DisplayText"
) { Source = column, ValidatesOnDataErrors =
false
, Mode = BindingMode.OneWay };
if
(column.GridColumn ==
null
)
{
throw
new
Exception(
"column.GridColumn("
+ column.DisplayText +
")==null"
);
}
column.GridColumn.SetBinding(GridViewColumn.HeaderProperty, bindingHeader);
Thanks for any suggestions
Best regards
Thomas Voß