diff --git a/.gitignore b/.gitignore index 4b82ccd..66ccd8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .vs/ bin/ obj/ +*.user diff --git a/ComanderApp.csproj.user b/ComanderApp.csproj.user deleted file mode 100644 index cd723ee..0000000 --- a/ComanderApp.csproj.user +++ /dev/null @@ -1,31 +0,0 @@ - - - - False - net9.0-windows10.0.19041.0 - Windows Machine - - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - Designer - - - \ No newline at end of file diff --git a/PanelCollectionView.cs b/PanelCollectionView.cs index 7c7b9b0..9d48180 100644 --- a/PanelCollectionView.cs +++ b/PanelCollectionView.cs @@ -14,10 +14,11 @@ public static class PanelCollectionView HeightRequest = 40, BackgroundColor = Colors.Transparent, BorderWidth = 0, - TextColor = Colors.Black, HorizontalOptions = LayoutOptions.Fill, }; + // Устанавливаем тематический цвет текста + button.SetAppThemeColor(Button.TextColorProperty, Colors.Black, Colors.White); button.SetBinding(Button.TextProperty, new Binding("DisplayText")); button.SetBinding(Button.CommandParameterProperty, new Binding(".")); @@ -35,14 +36,12 @@ public static class PanelCollectionView var commonStates = new VisualStateGroup { Name = "CommonStates" }; var normalState = new VisualState { Name = "Normal" }; - normalState.Setters.Add(new Setter { Property = Button.TextColorProperty, Value = Colors.Black }); var focusedState = new VisualState { Name = "Focused" }; focusedState.Setters.Add(new Setter { Property = Button.BorderColorProperty, Value = Colors.Blue }); focusedState.Setters.Add(new Setter { Property = Button.BorderWidthProperty, Value = 2 }); var pressedState = new VisualState { Name = "Pressed" }; - pressedState.Setters.Add(new Setter { Property = Button.TextColorProperty, Value = Colors.Black }); pressedState.Setters.Add(new Setter { Property = Button.BackgroundColorProperty, Value = Color.FromArgb("#e0e0e0") }); commonStates.States.Add(normalState);