Closed ZionGates closed 2 years ago
Also can the tabs be aligned to the Center instead of being left aligned?
Hello, To change the font Color on the MaterialTabItems, simply set a Foreground on each of them: <xctk:MaterialTabItem Header="First" HorizontalContentAlignment="Center" Content="MaterialTabItem 1" Foreground="Green"/>
Or set a style from the MaterialTabControl: <xctk:MaterialTabControl x:Name="materialTabControl" TabStripPlacement="Top" IsInkEffectActive="True" IsInkBarActive="True" IsSlidingAnimationActive="True">
Greetings, thanks for responding, I'm trying to set the FONT Family, not color. Like Arial, Verdana, etc. Also I need a code behind answer, no xaml. This control is being generated at runtime.
Hi, To modify the FontFamily instead of the Foreground, just replace the Foreground with FontFamily in the preceding example.
To do it in code-behind, you can do the same: -For all the MaterialTabItems: var myStyle = new Style( typeof( MaterialTabItem ) ); myStyle.Setters.Add( new Setter( FontFamilyProperty, new FontFamily("Wingdings") ) ); materialTabControl.Resources.Add( typeof( MaterialTabItem ), myStyle );
-For a specific MaterialTabItem: _materialTabItem.FontFamily = new FontFamily( "Wingdings" );
Thank you
Hi, To modify the FontFamily instead of the Foreground, just replace the Foreground with FontFamily in the preceding example.
To do it in code-behind, you can do the same: -For all the MaterialTabItems: var myStyle = new Style( typeof( MaterialTabItem ) ); myStyle.Setters.Add( new Setter( FontFamilyProperty, new FontFamily("Wingdings") ) ); materialTabControl.Resources.Add( typeof( MaterialTabItem ), myStyle );
-For a specific MaterialTabItem: _materialTabItem.FontFamily = new FontFamily( "Wingdings" );
Thank you
Thanks, that helped me.
Greetings, I'm using the MaterialTabControl and I like the cool animations however I can't seem to find the setting to change the Font on the Tabs themselves (where you click to change the tab page). Please assist.