Skip to content

Commit

Permalink
Fix TypesLayout children CheckedChanged delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
JunielKatarn committed Apr 30, 2021
1 parent 1131fb1 commit 941f6d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions Forms/Views/ScoreSelector.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<VisualStateGroup x:Name="CheckedStates">
<VisualState x:Name="Checked">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{StaticResource DarkButtonBackgroundColor}" />
<Setter Property="Style" Value="{StaticResource CheckedStyle}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Unchecked">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{StaticResource LightButtonBackgroundColor}" />
<Setter Property="Style" Value="{StaticResource UncheckedStyle}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand All @@ -41,6 +41,15 @@
</Frame>
</ControlTemplate>

<Style x:Key="CheckedStyle" TargetType="RadioButton">
<Setter Property="BackgroundColor" Value="DimGray" />
<Setter Property="BorderColor" Value="Cyan" />
</Style>

<Style x:Key="UncheckedStyle" TargetType="RadioButton">
<Setter Property="BorderColor" Value="DarkGray" />
</Style>

</ResourceDictionary>
</ContentView.Resources>

Expand Down
2 changes: 1 addition & 1 deletion Forms/Views/ScoreSelector.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public IList<ScoreInfo> Scores
ControlTemplate = Device.macOS != Device.RuntimePlatform ? ScoreSelectorTemplate : null,
TextColor = Color.White
};
rb.CheckedChanged += Instrument_CheckedChanged;
rb.CheckedChanged += Types_CheckedChanged;
if (TypesLayout.Children.Count == 0)
rb.IsChecked = true;//TODO: Override via settings

Expand Down

0 comments on commit 941f6d2

Please sign in to comment.