public IndexControl(IndexControlElement indexControlElement, DataGridControlElement dataGridControlElement, Visibility detailsBtnVisibility = Visibility.Hidden, Visibility crudBtnVisibility = Visibility.Visible)
 {
     InitializeComponent();
     this.IndexControlElement = indexControlElement;
     this.DataGridControl     = new DataGridControl(dataGridControlElement);
     DataContext = DataGridControl.DataGrid;
     this.detailsBtnVisibility = detailsBtnVisibility;
     this.crudBtnVisibility    = crudBtnVisibility;
     InitializeComponents();
 }
 private void DetailsButton_Click(object sender, RoutedEventArgs e)
 {
     IndexControlElement.Details(DataGridControl.DataGrid.SelectedItem, Height, Width);
     DataGridControl.Refresh();
 }
 private void CreateButton_Click(object sender, RoutedEventArgs e)
 {
     IndexControlElement.Create(Height, Width);
     DataGridControl.Refresh();
 }