ProjetThe/ProjetTheAlone/UserControlDIY/Plat.xaml

34 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-01-18 13:08:55 +01:00
<UserControl x:Class="ProjetTheAlone.UserControlDIY.Plat"
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:ProjetTheAlone.UserControlDIY"
xmlns:models="clr-namespace:ProjetTheAlone.Classes"
xmlns:convert="clr-namespace:ProjetTheAlone.Converter"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<UserControl.Resources>
<DataTemplate DataType="x:Type models:Plat">
<DockPanel Background="Yellow" />
</DataTemplate>
<convert:BinaryImageConverter x:Key="imgConverter" />
</UserControl.Resources>
<Grid x:Name="GridPrinc">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="FoodDesc" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="{Binding PlatV.P_nom}" />
<Image x:Name="FoodPic" Source="{Binding PlatV.P_img, Converter={StaticResource imgConverter}}" Grid.Column="1" Stretch="Uniform"/>
</Grid>
</UserControl>