Bonjour à tous.
J'ai créé mon tableau de données de type UnifromGrid avec mes datas de type Binding (c'est une liste contenant mes objets de ma classe, objets créé avec mes lignes SQL).
Ma liste est scrolalble, c'est ce que je voulais, c'est top.
Maintenant j'aimerais ajouter en haut de la liste scrollable un bouton fixe, et en bas de la liste scrollable un label, fixe aussi. Je veux toujours voir ces éléments même quand je scroll.
Malheureusement j'ai une erreur "La propriété "Content" est définie plusieurs fois :
Mon Code XAML :
Comment je peux ajouter mon bouton et mes labels ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Plutus" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Plutus.MainWindow" Title="MainWindow" Height="523.725" Width="898" Background="#FF3A3939" WindowStartupLocation="CenterScreen" WindowState="Maximized"> <Window.Resources> <Style TargetType="ScrollBar"> <Setter Property="Width" Value="35"/> </Style> </Window.Resources> <Button></Button> <ScrollViewer VerticalScrollBarVisibility="Auto" > <ItemsControl x:Name="lvDataBinding" HorizontalContentAlignment="Stretch" BorderThickness="0" Margin="10" Grid.Row="3" Background="{x:Null}" ItemsSource="{Binding}" Foreground="White"> <ItemsControl.ItemTemplate> <DataTemplate DataType="{x:Type local:CL_Operation}"> <Border BorderBrush="White" BorderThickness="1" CornerRadius="3" Margin="0,3" Grid.ColumnSpan="0" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top"> <Grid Width="{Binding strWidth}" Height="60" Background="Transparent" Margin="0,1"> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.08*" /> <ColumnDefinition Width="0.1*" /> <ColumnDefinition Width="0.1*" /> <ColumnDefinition Width="0.2*" /> <ColumnDefinition Width="0.1*" /> <ColumnDefinition Width="0.2*" /> <ColumnDefinition Width="0.1*" /> <ColumnDefinition Width="0.2*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <UniformGrid Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Background="#FFFF8200"> <TextBlock Text="{Binding strPriorite}" FontSize="36" Foreground="Red" HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="Bold" /> <TextBlock Text="{Binding strSsSect}" FontSize="12" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontWeight="Bold" /> </UniformGrid> <UniformGrid Grid.Column="1" Grid.Row="0" Grid.RowSpan="3"> <TextBlock Text="{Binding strRetardAvanceText}" FontSize="28" Foreground="{Binding scbColorRetardAvance}" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" /> </UniformGrid> <UniformGrid Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2"> <UniformGrid.Style> <Style TargetType="{x:Type UniformGrid}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Background" Value="Gray"/> </Trigger> </Style.Triggers> </Style> </UniformGrid.Style> <TextBlock Text="{Binding strNoOfOp}" FontSize="28" Foreground="White" FontWeight="Bold" MouseLeftButtonUp="Test"/> </UniformGrid> <UniformGrid Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="3"> <TextBlock Text="{Binding strDescriptionOp}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="4" Grid.Row="0"> <TextBlock Text="{Binding strNoArticle}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="4" Grid.Row="1"> <TextBlock Text="{Binding strDateFormatee}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="5" Grid.Row="0"> <TextBlock Text="{Binding strPcesPoste}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="5" Grid.Row="1"> <TextBlock Text="{Binding strTpsPoste}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="6" Grid.Row="0"> <TextBlock Text="{Binding strTempsPoste}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="6" Grid.Row="1"> <TextBlock Text="{Binding strClient}" FontSize="14" Foreground="White"/> </UniformGrid> <UniformGrid Grid.Column="6" Grid.Row="2" Grid.ColumnSpan="2"> <TextBlock Text="{Binding strTypeOp}" FontSize="14" Foreground="White"/> </UniformGrid> </Grid> </Border> </DataTemplate> </ItemsControl.ItemTemplate> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="2"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </ScrollViewer> </Window>
Merci
Partager