<UserControl x:Class="WpfDisplay.Views.TitleBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WpfDisplay.Views"
xmlns:vm="clr-namespace:WpfDisplay.ViewModels"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="300"
d:DataContext="{d:DesignInstance Type=vm:MainViewModel, IsDesignTimeCreatable=False}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding IFSTitle}" x:Name="titleTextBox" ToolTip="Title"
md:HintAssist.Hint="Enter a title"
TextAlignment="Center" FontWeight="Black" Grid.Column="0"
GotKeyboardFocus="titleTextBox_GotKeyboardFocus" KeyDown="titleTextBox_KeyDown"/>
<ToggleButton Grid.Column="1" x:Name="authorsToggle" Style="{DynamicResource MaterialDesignExpanderToggleButton}" ToolTip="Authors" Foreground="White" Cursor="Hand"/>
<Popup Grid.Column="2" IsOpen="{Binding IsChecked, ElementName=authorsToggle}"
Width="200" Placement="Bottom" PopupAnimation="Fade" StaysOpen="False" AllowsTransparency="True">
<md:Card Padding="4">
<StackPanel>
<Grid>
<Label>Authors:</Label>
<ToggleButton IsChecked="{Binding IsChecked, ElementName=authorsToggle}"
HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" FontSize="8" Height="26">❌</ToggleButton>
</Grid>
<ItemsControl ItemsSource="{Binding AuthorList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="8">
<Hyperlink NavigateUri="{Binding Link}" ToolTip="{Binding Link}">
<Run Text="{Binding Name}"/>
</Hyperlink>
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</md:Card>
</Popup>
</Grid>
</UserControl>