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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
<UserControl x:Class="Tango.FSE.UI.Dialogs.BugReportFullView"
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:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:local="clr-namespace:Tango.FSE.UI.Dialogs"
mc:Ignorable="d"
Width="900" Height="600" d:DataContext="{d:DesignInstance Type=local:BugReportFullViewVM, IsDesignTimeCreatable=False}" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
<DockPanel Margin="10">
<StackPanel DockPanel.Dock="Top">
<StackPanel Orientation="Horizontal">
<material:PackIcon Width="42" Height="42" VerticalAlignment="Center" Kind="Bugfood" Foreground="{StaticResource FSE_ErrorBrush}" />
<TextBlock VerticalAlignment="Center" Text="Report Issue" Margin="10 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}"></TextBlock>
</StackPanel>
<TextBlock Margin="0 10 0 0" Foreground="{StaticResource FSE_GrayBrush}" TextWrapping="Wrap">
<Run>It looks like we have some internal issues.</Run>
<LineBreak/>
<Run>Please provide as much information as you can about this issue you are experiencing.</Run>
</TextBlock>
</StackPanel>
<Grid Margin="0 20 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="505*"/>
<ColumnDefinition Width="376*"/>
</Grid.ColumnDefinitions>
<Grid>
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<TextBox x:Name="txt_title" Margin="0 0 0 0" Text="{Binding Title,NotifyOnValidationError=True,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" material:HintAssist.Hint="Title" material:HintAssist.IsFloating="True"></TextBox>
<Grid Margin="0 20 0 0">
<TextBox IsReadOnly="True" Cursor="Hand" material:HintAssist.Hint="Area" material:HintAssist.IsFloating="True" Text="{Binding Area.Name}"></TextBox>
<ToggleButton x:Name="toggleArea">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Grid Background="Transparent">
<Popup Height="200" StaysOpen="False" AllowsTransparency="True" Width="{TemplateBinding ActualWidth}" PopupAnimation="Slide" IsOpen="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<Border Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Margin="0 2 0 0" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1" CornerRadius="3">
<TreeView Loaded="TreeView_Loaded" ItemsSource="{Binding Areas}" SelectedItemChanged="TreeView_SelectedItemChanged">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding SubAreas}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
</Grid>
<autoComplete:AutoCompleteTextBox FontSize="{StaticResource FSE_DefaultFontSize}" IconVisibility="Collapsed" Margin="0 20 0 0" Provider="{Binding TeamMembersAutoComplete}" SelectedItem="{Binding AssignedTo,Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" DisplayMember="AssignName" material:HintAssist.Hint="Assigned To" material:HintAssist.IsFloating="True" VerticalContentAlignment="Bottom"/>
</StackPanel>
<DockPanel Margin="0 20 0 0">
<DockPanel DockPanel.Dock="Top">
<material:PackIcon Kind="Pencil" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}">What Happened ?</TextBlock>
</DockPanel>
<TextBox Background="{StaticResource FSE_PrimaryBackgroundBrush}" Text="{Binding Description,UpdateSourceTrigger=PropertyChanged}" Margin="0 3 0 0" Style="{StaticResource FSE_Rounded_Corners_TextBox_Multiline}" AcceptsReturn="True" TextWrapping="Wrap" Padding="5"></TextBox>
</DockPanel>
</DockPanel>
</Grid>
<Grid Grid.Column="1" Margin="20 15 0 0">
<UniformGrid Rows="3">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<material:PackIcon Kind="DebugStepInto" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}">Steps To Reproduce</TextBlock>
</DockPanel>
<TextBox Background="{StaticResource FSE_PrimaryBackgroundBrush}" Text="{Binding StepsToReproduce,UpdateSourceTrigger=PropertyChanged}" Margin="0 3 0 0" Style="{StaticResource FSE_Rounded_Corners_TextBox_Multiline}" AcceptsReturn="True" TextWrapping="Wrap" Padding="5"></TextBox>
</DockPanel>
<DockPanel Margin="0 20 0 0">
<DockPanel DockPanel.Dock="Top">
<material:PackIcon Kind="UserAlertOutline" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}">Additional Comments</TextBlock>
</DockPanel>
<TextBox TextWrapping="Wrap" Text="{Binding Comments,NotifyOnValidationError=True,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" Margin="0 2 0 0" Style="{StaticResource FSE_Rounded_Corners_TextBox_Multiline}" AcceptsReturn="True"></TextBox>
</DockPanel>
<DockPanel Margin="0 20 0 0">
<DockPanel DockPanel.Dock="Top">
<material:PackIcon Kind="Attachment" />
<UniformGrid Columns="2" DockPanel.Dock="Right">
<controls:IconButton Command="{Binding RemoveSelectedAttachementsCommand}" Icon="Minus" Foreground="{StaticResource FSE_RedBrush}" Width="20" Height="20" Padding="0" Cursor="Hand" ToolTip="Remove attachment" />
<controls:IconButton Command="{Binding AddAttachementCommand}" Icon="Plus" Foreground="{StaticResource FSE_GreenBrush}" Width="20" Height="20" Padding="0" Cursor="Hand" ToolTip="Add attachment" />
</UniformGrid>
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallFontSize}">Attachments</TextBlock>
</DockPanel>
<Grid>
<Border CornerRadius="5" Background="{StaticResource FSE_PrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource FSE_BorderBrush}">
<sharedControls:MultiSelectListBox FocusVisualStyle="{x:Null}" Style="{StaticResource {x:Type ListBox}}" ItemsSource="{Binding Attachments}" SelectedItemsList="{Binding SelectedAttachements}" SelectionMode="Extended">
<sharedControls:MultiSelectListBox.InputBindings>
<KeyBinding Key="Delete" Command="{Binding RemoveSelectedAttachementsCommand}" />
</sharedControls:MultiSelectListBox.InputBindings>
<sharedControls:MultiSelectListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</sharedControls:MultiSelectListBox.ItemsPanel>
<sharedControls:MultiSelectListBox.ItemTemplate>
<DataTemplate>
<DockPanel Width="85" Height="72">
<TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" DockPanel.Dock="Bottom" Margin="0 5 0 0" Text="{Binding Name}" TextAlignment="Center"></TextBlock>
<Image Source="{Binding File,Converter={StaticResource FilePathToIconConverter}}"></Image>
</DockPanel>
</DataTemplate>
</sharedControls:MultiSelectListBox.ItemTemplate>
</sharedControls:MultiSelectListBox>
</Border>
</Grid>
</DockPanel>
</UniformGrid>
</Grid>
</Grid>
</DockPanel>
</UserControl>
|