blob: 0a17a143084dabbe31145d2a5a0fe03d6b2c5fc3 (
plain)
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
|
<UserControl x:Class="Tango.PanelPC.UI.Views.JobsView"
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:vm="clr-namespace:Tango.PanelPC.UI.ViewModels"
xmlns:global="clr-namespace:Tango.PanelPC.UI"
xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.PanelPC.UI.Views"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:JobsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobsViewVM}">
<Grid>
<ListBox ItemsSource="{Binding Jobs}" SelectionMode="Extended" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.PanningMode="VerticalOnly" VirtualizingStackPanel.ScrollUnit="Pixel" HorizontalContentAlignment="Stretch">
<ListBox.Style>
<Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter>
</Style>
</ListBox.Style>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
<Setter Property="BorderBrush" Value="Silver"></Setter>
<Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Background" Value="White"></Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="White"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type entities:Job}">
<Border Padding="10">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/liquid.png" Width="50"></Image>
<StackPanel Margin="10 0 0 0">
<TextBlock Text="{Binding Name}"></TextBlock>
<TextBlock Text="{Binding Description}" FontSize="12" Foreground="Gray"></TextBlock>
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>
|