<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:MVVMFileManager="clr-namespace:MVVMFileManager" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	x:Class="MVMFileManager.MainPage"
	Width="600" Height="400">
	<UserControl.Resources>
		<sdk:HierarchicalDataTemplate x:Key="SilverlightFolderTemplate" ItemsSource="{Binding SubFolders}">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Source="Images/folder.png" Stretch="Fill" Width="16" Margin="0"/>
				<TextBlock Text="{Binding FolderName}" Margin="7,0,0,0"/>
			</StackPanel>
		</sdk:HierarchicalDataTemplate>
		<DataTemplate x:Key="SilverlightFileTemplate">
			<StackPanel Orientation="Horizontal">
				<Image Height="16" Source="Images/page_white.png" Stretch="Fill" Width="16"/>
				<HyperlinkButton Content="{Binding FileName}" NavigateUri="{Binding FilePath}"/>
			</StackPanel>
		</DataTemplate>
		<sdk:HierarchicalDataTemplate x:Key="SilverlightFolderTemplate1" ItemsSource="{Binding SubFolders}">
			<StackPanel>
				<TextBlock Text="{Binding FolderName}"/>
				<TextBlock Text="{Binding FullPath}"/>
			</StackPanel>
		</sdk:HierarchicalDataTemplate>
		<DataTemplate x:Key="SilverlightFileTemplate1">
			<StackPanel>
				<TextBlock Text="{Binding FileName}"/>
				<TextBlock Text="{Binding FilePath}"/>
			</StackPanel>
		</DataTemplate>
	</UserControl.Resources>
	<Canvas x:Name="LayoutRoot" Background="White">
		<Canvas.DataContext>
			<MVVMFileManager:MainViewModel/>
		</Canvas.DataContext>
		<Grid Height="350" Canvas.Top="49" Width="600">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="0.493*"/>
				<ColumnDefinition Width="0.507*"/>
			</Grid.ColumnDefinitions>
			<ScrollViewer x:Name="FileFolders" Margin="5" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
				<sdk:TreeView x:Name="treeView" ItemTemplate="{StaticResource SilverlightFolderTemplate}" ItemsSource="{Binding SilverlightFolders}">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="SelectedItemChanged">
							<i:InvokeCommandAction Command="{Binding SetFilesCommand}" CommandParameter="{Binding SelectedItem, ElementName=treeView, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
				</sdk:TreeView>
			</ScrollViewer>
			<sdk:GridSplitter HorizontalAlignment="Left" Width="9" Margin="-4,90,0,100" Background="Silver" Grid.Column="1"/>
			<ScrollViewer x:Name="FileDetails" Grid.Column="1" Margin="5" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
				<ListBox ItemTemplate="{StaticResource SilverlightFileTemplate}" ItemsSource="{Binding SilverlightFiles}"/>
			</ScrollViewer>
		</Grid>
	</Canvas>
</UserControl>