You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
1.5 KiB
21 lines
1.5 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:conv="clr-namespace:Stim.Converter"
|
|
x:Class="Stim.StarsContainer"
|
|
x:Name="StarsContainerView">
|
|
|
|
<ContentView.Resources>
|
|
<conv:DoubleToStar x:Key="DoubleToStar" EtoilePleine="etoile_pleine.png" EtoileMiPleine="etoile_mi_pleine.png" EtoileVide="etoile_vide.png"/>
|
|
</ContentView.Resources>
|
|
|
|
<HorizontalStackLayout Grid.Column="1" HorizontalOptions="End" BindingContext="{x:Reference StarsContainerView}">
|
|
<Label Text="{Binding Rate, FallbackValue='0', StringFormat='{0}/5'}" FontSize="20"/>
|
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='1'}"/>
|
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='2'}"/>
|
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='3'}"/>
|
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='4'}"/>
|
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='5'}"/>
|
|
</HorizontalStackLayout>
|
|
</ContentView>
|