MaterialDesignInXAML / MaterialDesignInXamlToolkit

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

DatePicker bottom border #2559

Open frostiger opened 2 years ago

frostiger commented 2 years ago

Is it possible to remove the border at the bottom of a MaterialDesignFilledDatePicker? I can't find a way. I set the BorderThickness to 0 but the border is still visible.

This should be the same issue as #1813 and it was fixed in v3.2.0 but it look's like the issue is present again.

<DatePicker Style="{StaticResource MaterialDesignFilledDatePicker}"
                    Width="200"
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center"
                    Padding="15"
                    BorderThickness="0"
                    materialDesign:TextFieldAssist.TextFieldCornerRadius="20"
                    materialDesign:TextFieldAssist.DecorationVisibility="Collapsed"
                    materialDesign:TextFieldAssist.RippleOnFocusEnabled="False" />

image

MichelMichels commented 2 years ago

The issue is that there is a DatePickerTextBox inside DatePicker which also has a static BorderThickness set.

I fixed the issue by adding a TemplateBinding inside the DatePicker style and now it behaves like this: DatePicker_NoBorder

I don't know if this is the behaviour you are looking for and if this is in line with our project standards. @Keboo @Xaalek could you review this UI change in the GIF?

MichelMichels commented 2 years ago

After further testing, it seems the adding of the TemplateBinding breaks other styles (Outlined f.e.). I'll try to fix these issues before submitting a PR.