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
| <ListBox x:Name="lstInterv" HorizontalAlignment="Left" BorderThickness="0" Padding="0,0,0,0" VerticalAlignment="Center" Margin="50,20,0,0" Background="#36617584" MaxHeight="700" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,-3,-3,0" x:Name="SPInterv">
<ContentControl DataContext="{Binding intervenant}" Visibility="Collapsed" />
<Border BorderThickness="0,1,1,2" BorderBrush="#FF617584" Padding="0" Margin="0,0,0,0">
<TextBlock Text="{Binding intervenant.codeIntervenant}" TextAlignment="Center" VerticalAlignment="Center" Width="50" TextWrapping="Wrap"/>
</Border>
<Border BorderThickness="0,1,1,2" BorderBrush="#FF617584" Padding="0" Margin="0,0,0,0">
<TextBlock Text="{Binding intervenant.strInterv}" TextAlignment="Center" VerticalAlignment="Center" Width="150" TextWrapping="Wrap"/>
</Border>
<ListBox x:Name="lstJInter" HorizontalAlignment="Center" d:LayoutOverrides="HorizontalAlignment" BorderThickness="0" Padding="0" ItemsSource="{Binding lstJourInter}" BorderBrush="Black">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="0,1,1,2" BorderBrush="#FF617584" Padding="0" Margin="-3,-3,-3,-3" Width="165">
<StackPanel AllowDrop="True" x:Name="SPJInter">
<ContentControl DataContext="{Binding jour}" Visibility="Collapsed" />
<myDDL:FixedListBoxDragDropTarget AllowDrop="True" Drop="ListBoxDragDropTarget_Drop">
<!-- Cette classe supprime le bug du drag'n drop du toolkit d'origine -->
<ListBox x:Name="lstInter" BorderThickness="0" Padding="0" ItemsSource="{Binding lstInter}" Height="50" Width="160" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Auto" MouseLeftButtonUp="lstInter_MouseLeftButtonUp" MouseRightButtonDown="lstInter_MouseRightButtonDown" MouseRightButtonUp="lstInter_MouseRightButtonUp" Background="{Binding backGround}" MouseLeftButtonDown="lstInter_MouseLeftButtonDown">
<ListBox.ItemTemplate>
<DataTemplate>
<Border CornerRadius="3" Height="15" BorderThickness="2" BorderBrush="{Binding findInterBorderColor}" VerticalAlignment="Top" Background="{Binding findInterColor}" Width="150" Margin="-2,0,0,-5">
<TextBlock Text="{Binding shortInfoPlanning}" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" FontSize="9" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</myDDL:FixedListBoxDragDropTarget>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox> |