Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<ControlTemplate x:Key="CalendarRadioTemplate">
<Frame BorderColor="#F3F2F1" BackgroundColor="#F3F2F1" HasShadow="False"
HeightRequest="100" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Start" Padding="0">
<VisualStateManager.VisualStateGroups>
<VisualStateGroupList>
<VisualStateGroup x:Name="CheckedStates">
<VisualState x:Name="Checked">
<VisualState.Setters>
<Setter Property="BorderColor" Value="#FF3300"/>
<Setter TargetName="Check" Property="Opacity" Value="1"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Unchecked">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="#f3f2f1"/>
<Setter Property="BorderColor" Value="#f3f2f1"/>
<Setter TargetName="Check" Property="Opacity" Value="0"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</VisualStateManager.VisualStateGroups>
<Grid Margin="4" WidthRequest="100">
<Grid WidthRequest="18" HeightRequest="18" HorizontalOptions="End" VerticalOptions="Start">
<Ellipse Stroke="Blue" WidthRequest="16" HeightRequest="16" StrokeThickness="0.5" VerticalOptions="Center" HorizontalOptions="Center" Fill="White" />
<Ellipse x:Name="Check" WidthRequest="8" HeightRequest="8" Fill="Blue" VerticalOptions="Center" HorizontalOptions="Center" />
</Grid>
<ContentPresenter></ContentPresenter>
</Grid>
</Frame>
</ControlTemplate>
@Cfun1

This comment has been minimized.

Copy link

@Cfun1 Cfun1 commented Dec 10, 2020

throwing the error:

Expected Setter but found Xamarin.Forms.Frame. Property not set.

When removed <VisualStateGroupList> everything becomes ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment