/// <summary> /// Method used for changing the Layout for the MDI elements. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Layout_Click(object sender, RoutedEventArgs e) { //Changing Document Containter Layout Button c = (Button)sender; string g = c.Content.ToString(); switch (c.Name) { case "Cascade": DocContainer.SetLayout(MDILayout.Cascade); DocumentContainer.SetCanDrag(firstdoc, true); DocumentContainer.SetCanDrag(seconddoc, true); DocumentContainer.SetCanDrag(ThirdDoc, true); break; case "THorizontal": DocContainer.SetLayout(MDILayout.Horizontal); DocumentContainer.SetCanDrag(firstdoc, false); DocumentContainer.SetCanDrag(seconddoc, false); DocumentContainer.SetCanDrag(ThirdDoc, false); break; case "TVertical": DocContainer.SetLayout(MDILayout.Vertical); DocumentContainer.SetCanDrag(firstdoc, false); DocumentContainer.SetCanDrag(seconddoc, false); DocumentContainer.SetCanDrag(ThirdDoc, false); break; } }