/*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2017 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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 System.Globalization;
using System.Reflection;
using Xceed.Wpf.Toolkit.LiveExplorer;
using Xceed.Wpf.Toolkit.LiveExplorer.Core;
using System.Diagnostics;
namespace Xceed.Wpf.Toolkit.LiveExplorer
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
private const string toolkitAssembly = "Xceed.Wpf.Toolkit.LiveExplorer";
public MainWindow()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler( this.MainWindow_Loaded );
VersionTextBlock.Text = "Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
#region Properties
#region View
public static readonly DependencyProperty ViewProperty = DependencyProperty.Register( "View", typeof( DemoView ), typeof( MainWindow ), new UIPropertyMetadata( null, OnViewChanged ) );
public DemoView View
{
get
{
return ( DemoView )GetValue( ViewProperty );
}
set
{
SetValue( ViewProperty, value );
}
}
private static void OnViewChanged( DependencyObject o, DependencyPropertyChangedEventArgs e )
{
MainWindow window = o as MainWindow;
if( window != null )
window.OnViewChanged( ( DemoView )e.OldValue, ( DemoView )e.NewValue );
}
protected virtual void OnViewChanged( DemoView oldValue, DemoView newValue )
{
this.InitView();
}
#endregion //View
#endregion //Properties
#region Event Handler
void MainWindow_Loaded( object sender, RoutedEventArgs e )
{
this.InitView();
}
private void OnTreeViewSelectionChanged( object sender, RoutedPropertyChangedEventArgs