enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
982 stars 110 forks source link

Changing the accentcolor of an input control does not take affect until you deselect and reselect the control #624

Open DeliriumCode opened 1 month ago

DeliriumCode commented 1 month ago

I have customisable themes within my app, I have the accent color bound via data binding to the current color selections, however you have to deselect the textcontrol and reselect it to apply the new color.

 <VerticalStackLayout Padding="8" Margin="0">
     <material:TextField Title="{x:Static resx:GeneralText.Group_Name}" Text="{Binding Name}"  AccentColor="{Binding ColorAccent}">
         <material:TextField.Validations>
             <validation:RequiredValidation Message="{x:Static resx:GeneralText.Validation_Required}" />
         </material:TextField.Validations>
     </material:TextField>

     <controls:ColorPalette
         SelectedColor="{Binding ColorAccent, Mode=TwoWay}"
         Colors="{StaticResource ColorPaletteArray}"/>
 </VerticalStackLayout>