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.
65 lines
3.5 KiB
65 lines
3.5 KiB
<UserControl x:Class="Projet1.UserControl1"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Projet1"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
x:Name="root">
|
|
<!-- Backgrond de l'UserControl-->
|
|
<Border>
|
|
<Border.Resources>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Background" Value="{StaticResource elementColor}"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter Property="CornerRadius" Value="10"/>
|
|
<Setter Property="Margin" Value="5,0,5,0"/>
|
|
<Setter Property="Padding" Value="3"/>
|
|
</Style>
|
|
</Border.Resources>
|
|
<!-- Affiche l'Image du Titre, Nom du Titre, Nom de L'artiste, Nom de l'album, et deux boutons Modifier et Favoris-->
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Image Source="{Binding CheminImage.Chemin, ElementName=root, Converter={StaticResource string2ImageConverter}}" Width="Auto" MaxHeight="50" Grid.RowSpan="3" Margin="5"/>
|
|
|
|
<TextBlock Style="{StaticResource textList}" Grid.Column="1" Text="{Binding Nom, ElementName=root, FallbackValue=Aurelie}"/>
|
|
<TextBlock Style="{StaticResource textList}" Grid.Column="1" Grid.Row="1" Text="{Binding NomArtiste.Nom, ElementName=root, FallbackValue=Colonel}"/>
|
|
<TextBlock Style="{StaticResource textList}" Grid.Column="1" Grid.Row="2" Text="{Binding NomAlbum, ElementName=root, FallbackValue=Au Rapport}"/>
|
|
|
|
<Button Click="Button_Modif" Grid.Column="2" Grid.RowSpan="3" Background="Transparent" BorderBrush="Transparent">
|
|
<Image Source="icones/pen_empty.png" Width="16"/>
|
|
</Button>
|
|
<!-- Bouton Favoris, si la propriété IsFavori est true affiche un coeur rempli, sinon affiche un coeur vide-->
|
|
<Button Click="Button_AddFav" Grid.Column="3" Grid.RowSpan="3" Background="Transparent" BorderBrush="Transparent">
|
|
<Image x:Name="HeartImageFavoris" Width="16">
|
|
<Image.Style>
|
|
<Style TargetType="{x:Type Image}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsFavoris}" Value="False">
|
|
<Setter Property="Source" Value="icones/heart_icon_empty.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsFavoris}" Value="True">
|
|
<Setter Property="Source" Value="icones/heart_icon_fill.png"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image>
|
|
|
|
</Button>
|
|
</Grid>
|
|
|
|
</Border>
|
|
</UserControl>
|