Skip to content

Commit

Permalink
Modus styling issue - unable to change the control label text color #414
Browse files Browse the repository at this point in the history
  • Loading branch information
amosekr committed Dec 4, 2024
1 parent a20cb63 commit 365acb9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public bool IsReadOnly
public ControlLabel()
{
InitializeComponent();
this.SetDynamicResource(StyleProperty, "DefaultControlLabelStyle");
}

private static void OnHeaderTextColorPropertyChanged(BindableObject bindable, object oldValue, object newValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
x:Class="Trimble.Modus.Components.ControlLabelStyles">
<Style TargetType="local:ControlLabel"
x:Key="Default">
x:Key="DefaultControlLabelStyle">
<Setter Property="HeaderTextColor"
Value="{DynamicResource LabelTextColor}" />
Value="{DynamicResource ControlLabelTextColor}" />
</Style>

</ResourceDictionary>
2 changes: 1 addition & 1 deletion Trimble.Modus.Components/Styles/DarkThemeStyling.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
x:Class="Trimble.Modus.Components.Styles.DarkThemeStyling">

<!--Label-->
<styles:ReferenceColor x:Key="LabelTextColor"
<styles:ReferenceColor x:Key="ControlLabelTextColor"
Color="{StaticResource DefaultTextColor}" />

<!--Button-->
Expand Down
2 changes: 1 addition & 1 deletion Trimble.Modus.Components/Styles/LightThemeStyling.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:styles="clr-namespace:Trimble.Modus.Components.Styles"
x:Class="Trimble.Modus.Components.Styles.LightThemeStyling">
<!--Label-->
<styles:ReferenceColor x:Key="LabelTextColor"
<styles:ReferenceColor x:Key="ControlLabelTextColor"
Color="{StaticResource DefaultTextColor}" />

<!--Button-->
Expand Down

0 comments on commit 365acb9

Please sign in to comment.