aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-02-10 18:28:41 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-02-10 18:28:41 +0200
commita65868d1d77b1929b855abd0c19bdc08bc9cee9d (patch)
tree09486bed718fb096914780f33313fb82a0207c87 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
parent82179e1b69b62b971a04af571979e7d10c60fd7a (diff)
parentac9678197fc6142595089155d98442239a64e6d7 (diff)
downloadTango-a65868d1d77b1929b855abd0c19bdc08bc9cee9d.tar.gz
Tango-a65868d1d77b1929b855abd0c19bdc08bc9cee9d.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
index 72bef1205..e17ed7d93 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs
@@ -12,6 +12,8 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.MachineStudio.UI.ViewModels;
+using Tango.TFS;
namespace Tango.MachineStudio.UI.Views
{
@@ -20,16 +22,47 @@ namespace Tango.MachineStudio.UI.Views
/// </summary>
public partial class ReportIssueView : UserControl
{
+ private ReportIssueViewVM _vm;
+
public ReportIssueView()
{
InitializeComponent();
this.Loaded += ReportIssueView_Loaded;
+ this.DataContextChanged += ReportIssueView_DataContextChanged;
+ }
+
+ private void ReportIssueView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ _vm = this.DataContext as ReportIssueViewVM;
}
private void ReportIssueView_Loaded(object sender, RoutedEventArgs e)
{
txt_title.Focus();
}
+
+ private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
+ {
+ _vm.WorkItem.Area = e.NewValue as Area;
+ toggleArea.IsChecked = false;
+ }
+
+ private TreeView tree;
+
+ private void TreeView_Loaded(object sender, RoutedEventArgs e)
+ {
+ tree = sender as TreeView;
+ tree.ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged;
+ }
+
+ private void ItemContainerGenerator_StatusChanged(object sender, EventArgs e)
+ {
+ if (tree.ItemContainerGenerator.Status == System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
+ {
+ TreeViewItem i = tree.ItemContainerGenerator.ContainerFromIndex(0) as TreeViewItem;
+ i.IsExpanded = true;
+ }
+ }
}
}