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
| <ListView Name="ListViewStoreInfos" Background="Transparent" BorderBrush="Transparent" Margin="0,-4,0,-2"
SelectedItem="{Binding StoreInfo}" ItemsSource="{Binding Contract.StoreInfos}"
KeyboardNavigation.TabNavigation="Cycle" >
<!-- WPF: How To Tab Between Items In a ListBox -->
<!-- https://social.technet.microsoft.com/wiki/contents/articles/25152.wpf-how-to-tab-between-items-in-a-listbox.aspx -->
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="IsTabStop" Value="False"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" ></StackPanel>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Grid DockPanel.Dock="Left" VerticalAlignment="Top">
<Grid.Resources>
<Style TargetType="RowDefinition">
<Setter Property="Height" Value="22" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="DatePicker">
<Setter Property="MaxWidth" Value="100"/>
<Setter Property="Margin" Value="0,0,0,2"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="20"/>
<RowDefinition Height="27" />
<RowDefinition Height="27" />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="{Binding Store.Code}" FontWeight="Bold" Grid.Row="0" />
<TextBlock Text="{Binding Store.Name}" FontWeight="Bold" Grid.Row="1" />
<DatePicker SelectedDate="{Binding Start}" Grid.Row="2" />
<DatePicker SelectedDate="{Binding End}" Grid.Row="3" />
<xceed:DecimalUpDown Value="{Binding Margin}" Grid.Row="4" Minimum="0" Maximum="99.99"/>
<TextBlock Text="{Binding MarginSupplier}" Grid.Row="5" />
<xceed:IntegerUpDown Value="{Binding Minutes}" Grid.Row="6" Margin="0,0,0,2" Minimum="0" />
<xceed:DecimalUpDown Value="{Binding SummerMeter}" Grid.Row="7" Margin="0,0,0,2" Minimum="0" Maximum="99.99" />
<xceed:DecimalUpDown Value="{Binding WinterMeter}" Grid.Row="8" Margin="0,0,0,2" Minimum="0" Maximum="99.99"/>
<Button Name="ButtonDeleteStore" HorizontalAlignment="Right" Background="Transparent" BorderBrush="Transparent" Click="ButtonRemoveStore_Click" Grid.RowSpan="2" VerticalAlignment="Top" >
<Button.ToolTip>
<WrapPanel>
<TextBlock Name="TextBlockToolTipDeleteStore" Text="Delete store infos " />
<TextBlock Text="{Binding Store.DisplayCodeName}" />
</WrapPanel>
</Button.ToolTip>
<Image Height="15" Source="/Ressources/Close.png" Margin="2"/>
</Button>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView> |
Partager