using System;
using System.Linq;
using System.Windows.Controls;
using System.Windows;
using Showcase.WPF.DragDrop.ViewModels;
namespace Showcase.WPF.DragDrop
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = new MainViewModel();
this.Loaded += MainWindowLoaded;
}
private void MainWindowLoaded(object sender, RoutedEventArgs e)
{
var appArgs = Environment.GetCommandLineArgs();
if (appArgs.Length > 1 && appArgs[1] == "anotherOne")
{
this.MainTabControl.SelectedItem = MainTabControl.Items.OfType().FirstOrDefault(t => (string)t.Header == "Mixed");
}
}
}
}