<!--
	Copyright (c) Microsoft. All rights reserved.
-->

<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<UserControl.Resources>
		<ResourceDictionary>
			<!-- By using MergedDictionaries, if there is a collision between the same resource, the last one wins -->
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/xaml/view/styles/MsoCustomDialogStyles.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
		<!-- Data template for list of notebooks -->
		<DataTemplate x:Key="NotebooksToBeClosedListBoxItemTemplate">
			<Grid>
				<Grid.ColumnDefinitions>
					<!-- use two columns so long notebook name is wrapped within the second one -->
					<!-- first column is prefix dash "-" before notebook name -->
					<ColumnDefinition Width="20"/>
					<!-- second column is notebook name -->
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<TextBlock x:Name="NotebookToBeClosedName" Style="{StaticResource BodyTextStyle}" TextWrapping="Wrap"
							Text="{Binding}" Grid.Row="0" Grid.Column="1"/>
			</Grid>
		</DataTemplate>
	</UserControl.Resources>
	<!-- SettingsUI Body -->
	<StackPanel>
		<!-- List of notebooks -->
		<TextBlock Style="{StaticResource BodyTextStyle}" Margin="0,0,0,10" 
			Visibility="{Binding ShouldShowAccountWarningMessage, Converter={StaticResource BoolToVisibility}}"
			Text="{Binding RemoveAccountWarningMessage}"/>
		<TextBlock Style="{StaticResource BodyTextStyle}"  
			Visibility="{Binding ShouldShowNotebookWarningMessage, Converter={StaticResource BoolToVisibility}}"
			Text="{CustomResource :appstring:0x028B8C24L}"/>
		<ScrollViewer MaxHeight="350" VerticalScrollBarVisibility="Auto" Margin="0,5,0,5">
			<ItemsControl x:Name="NotebooksToBeClosedListBox" BorderThickness="0" Background="Transparent"
				Visibility="{Binding ShouldShowNotebookWarningMessage, Converter={StaticResource BoolToVisibility}}"
				ItemTemplate="{StaticResource NotebooksToBeClosedListBoxItemTemplate}" 
				ItemsSource="{Binding NotebooksToBeClosed}"/>
		</ScrollViewer>
		<TextBlock Style="{StaticResource BodyTextStyle}"
			Visibility="{Binding ShouldShowNotebookWarningMessage, Converter={StaticResource BoolToVisibility}}"
			Text="{CustomResource :appstring:0x28D54867L}" />
	</StackPanel>
</UserControl>
