Hauteur plat non automatique

This commit is contained in:
adri 2019-01-18 19:04:54 +01:00
parent 995fb3068e
commit 8c94a47456
5 changed files with 34 additions and 9 deletions

View File

@ -19,6 +19,7 @@
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Evenement Futur" />
<TextBlock Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" HorizontalAlignment="Center" Height="Auto" Text="Nom Evenement Futur" />
</Grid>
</UserControl>

View File

@ -32,14 +32,26 @@
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ItemsControl x:Name="RepasMatin">
<ItemsControl.ItemTemplate>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
µ
</Grid.RowDefinitions>
<DockPanel>
<ListView x:Name="RepasMatin">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Height" Value="65"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplate DataType="classes:C_T_plat">
<control:Plat ></control:Plat>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ListView.ItemTemplate>
</ListView>
</DockPanel>
<materialDesign:PackIcon Kind="Build" Grid.Column="2" HorizontalAlignment="Right" Cursor="Hand"/>

View File

@ -63,13 +63,15 @@ namespace ProjetTheAlone.View
byte[] result = br.ReadBytes((int)fs.Length);
br.Close();
fs.Close();
Rm.ListPlat.Add(new C_T_plat("Desert", result, null));
Rm.ListPlat.Add(new C_T_plat("Desert", result, null));
Rm.ListPlat.Add(new C_T_plat("Desert", result, null));
Rm.ListPlat.Add(new C_T_plat("Entrée", result, null));
Rm.ListPlat.Add(new C_T_plat("Plat", result, null));
Rm.ListPlat.Add(new C_T_plat("Desert", result, null));
Console.WriteLine($"~~~~~~{Rm.ListPlat[0].P_nom}~~~~~~");
RepasMatin.ItemsSource = Rm.ListPlat;
//Test.DataContext = Rm.ListPlat[0];
//Test1.DataContext = Rm.ListPlat[1];
//Test2.DataContext = Rm.ListPlat[2];
}

View File

@ -11,6 +11,16 @@ namespace ProjetTheAlone.ViewModel
public class BasePropriete : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string name)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(name));
}
}
protected void NotifyPropertyChanged(String propertyName)
{ PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); }
protected bool AssignerChamp<T>(ref T field, T value, string propertyName)

BIN
script.sql Normal file

Binary file not shown.