@@ -7,11 +7,33 @@ open Fabulous.Avalonia
7open type Fabulous.Avalonia.View
7open type Fabulous.Avalonia.View
9module TextFields =
9module TextFields =
11+ open Avalonia.Styling
13+ let private whiteBg =
14+ let bg = Avalonia.Media.Immutable.ImmutableSolidColorBrush(Colors.White)
15+ let setter = Setter(Avalonia.Controls.Border.BackgroundProperty, bg)
17+ [ Skrepka.Styles.style
18+ (_.OfType<Avalonia.Controls.TextBox>()
19+ .Class(":pointerover")
21+ .OfType<Avalonia.Controls.Border>()
22+ .Name("PART_BorderElement"))
25+ (_.OfType<Avalonia.Controls.TextBox>()
28+ .OfType<Avalonia.Controls.Border>()
29+ .Name("PART_BorderElement"))
10 let textField value msg =
32 let textField value msg =
11− Grid() {
33+ (Grid() {
12− TextBox(value, msg).fontFamily (Constants.fontFamily)
34+ TextBox(value, msg).fontFamily(Constants.fontFamily).verticalAlignment(VerticalAlignment.Stretch).verticalContentAlignment(VerticalAlignment.Center).background(SolidColorBrush(Colors.White))
13 Rectangle().stroke(Colors.Black).strokeThickness (4.)
35 Rectangle().stroke(Colors.Black).strokeThickness (4.)
14− }
36+ }).styles (whiteBg)
16 let multilineTextField value msg =
38 let multilineTextField value msg =