コード例 #1
0
 public SegmentDetailsWindow(SegmentDetailsView view, SegmentDetailsViewModel model)
 {
     InitializeComponent();
     this.DataContext = model;
     this.Content = view;
     this.Title = "Segment Details: " + model.Name;
     this.ShowActivated = true;
 }
コード例 #2
0
ファイル: PhotoView.xaml.cs プロジェクト: swkrueger/signrider
 protected void HandleSegmentDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var selectedSegment = ((ListBoxItem)sender).Content as SegmentViewModel;
     SegmentDetailsViewModel segmentViewModel = new SegmentDetailsViewModel(selectedSegment.Segment);
     segmentViewModel.Name = string.Format(
         "{0}-{1}",
         this.photoViewModel.photo.title,
         this.photoViewModel.SegmentViews.IndexOf(selectedSegment)
         );
     SegmentDetailsView view = new SegmentDetailsView(segmentViewModel);
     SegmentDetailsWindow window = new SegmentDetailsWindow(view, segmentViewModel);
     window.Show();
 }
コード例 #3
0
 public SegmentDetailsView(SegmentDetailsViewModel viewModel)
 {
     InitializeComponent();
     this.viewModel = viewModel;
     this.DataContext = viewModel;
 }