ProjetThe/ProjetTheAlone/UserControlDIY/Repa.xaml.cs

44 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ProjetTheAlone.Classes;
using ProjetTheAlone.Model;
using ProjetTheAlone.ViewModel;
namespace ProjetTheAlone.UserControlDIY
{
/// <summary>
/// Interaction logic for Repa.xaml
/// </summary>
public partial class Repa : UserControl
{
public Repa()
{
InitializeComponent();
this.DataContextChanged += new DependencyPropertyChangedEventHandler(updateDataContext);
}
public void updateDataContext(object o, DependencyPropertyChangedEventArgs e)
{
var a = this.DataContext;
GridPrinc.DataContext = ((RepaModel) this.DataContext);
/*Plat1XML.DataContext = ((RepaModel)this.DataContext).Plat1;
Plat2XML.DataContext = ((RepaModel)this.DataContext).Plat2;
Plat3XML.DataContext = ((RepaModel)this.DataContext).Plat3;*/
}
}
}