-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoardColumn.xaml
58 lines (52 loc) · 3.07 KB
/
BoardColumn.xaml
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
<UserControl x:Class="Kanaban.BoardColumn"
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:local="clr-namespace:Kanaban"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d" Loaded="AListBox_OnLoaded" x:Name="control"
d:DesignHeight="450" d:DesignWidth="350">
<GroupBox Style="{StaticResource MaterialDesignCardGroupBox}"
Header="{Binding ElementName=control , Path=ListType , FallbackValue=Header}" Margin="4">
<materialDesign:DialogHost x:Name="host">
<Grid>
<ListBox Name="lst" Drop="UIElement_OnDrop" AllowDrop="True"
PreviewMouseLeftButtonDown="UIElement_OnPreviewMouseLeftButtonDown">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="local:WorkItem">
<DataTemplate.Resources>
<local:PriorityToColorConverter x:Key="con" />
</DataTemplate.Resources>
<Border Background="{Binding Priority , Converter={StaticResource con}}" Padding="4"
CornerRadius="5">
<StackPanel>
<TextBlock FontSize="20" Text="{Binding Title}" />
<TextBlock FontSize="15" Text="{Binding Description}" TextWrapping="Wrap" />
<TextBlock FontSize="15" Text="{Binding Priority}" HorizontalAlignment="Right"
Margin="3" FontWeight="Bold" />
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.Items>
<local:WorkItem />
</ListBox.Items>
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Delete" Click="MenuItem_OnClick" />
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
<Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFloatingActionButton}"
Content="+" FontSize="35" VerticalContentAlignment="Top" VerticalAlignment="Bottom"
Margin="0,0,20,20" Click="btn_add_click" />
</Grid>
</materialDesign:DialogHost>
</GroupBox>
</UserControl>