MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
15.04k stars 3.41k forks source link

Hint Assist Background not Working #2215

Open gagsti02 opened 3 years ago

gagsti02 commented 3 years ago

I tried Styling Outlined TextField but I can't bypass Hint Assist Background :

    <Style x:Key="GlobalTextBox" BasedOn="{StaticResource MaterialDesignOutlinedTextFieldTextBox}" TargetType="TextBox">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="materialDesign:HintAssist.Background" Value="{StaticResource MainBackColor}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="BorderBrush" Value="White"/>
        <Setter Property="CaretBrush" Value="#FFD94448"/>
        <Setter Property="SelectionBrush" Value="#FFD94448"/>
    </Style>
Erapchu commented 3 years ago

Hi! What are you want to do with Text field? Just change hint assist background, right? On my side all is fine. I can change hint assist backround with this attached property: <Setter Property="materialDesign:HintAssist.Background" Value="{StaticResource MainBackColor}"/>

EpiclyDelicious commented 3 years ago

@Erapchu & @Keboo - I believe I am running into the same/similar issue (using VS19 & version 4.0.0 of the project). I attempt to stylize an outlined textbox and only certain properties are taken into account.

Controls are using a style in the App.xaml file with: BasedOn="{StaticResource MaterialDesignOutlinedTextBox}" TargetType="{x:Type TextBox}"

Neither of the setters below affect the applied TextBoxes or their floating hint. Margin, FontSize, and materialDesign:TextFieldAssist.HasLeadingIcon work though.

<Setter Property="Padding" Value="0"/>
<Setter Property="materialDesign:HintAssist.Background" Value="{DynamicResource MaterialDesignCardBackground}"/>

Additionally, the floating hint background appears to be stuck utilizing the brush MaterialDesignPaper unless you change the materialDesign:HintAssist.Background value on the control itself versus using a style in the App.xaml file.

I think I saw this was fixed in a previous PR or commit, but I am unsure. Let me know if I can provide any more information or screenshots to help with this.

BigBadBleuCheese commented 3 years ago

Also having this problem. I have yet to succeed in changing it at all.