<Window x:Class="District_3_App.FriendsWindow.CustomWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:District_3_App"
        mc:Ignorable="d"
        Title="CustomWindow" Height="337" Width="419">
    <Window.Resources>
        <ControlTemplate x:Key="LoadingButtonTemplate" TargetType="Button">
            <Grid>
                <Image Source="imageSearch.png" Stretch="Uniform"/>
            </Grid>
        </ControlTemplate>

        <Style x:Key="RoundCheckBoxStyle" TargetType="CheckBox">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="CheckBox">
                        <Grid>
                            <Ellipse x:Name="OuterCircle" Width="20" Height="20" Fill="Transparent" Stroke="Black" StrokeThickness="2"/>
                            <Path x:Name="TickSymbol" Data="M5,10 L9,14 L15,6" Stroke="Black" StrokeThickness="2" Visibility="Visible"/>
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="True">
                                <Setter TargetName="TickSymbol" Property="Stroke" Value="White"/>
                                <Setter TargetName="OuterCircle" Property="Fill" Value="Black"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="ListBoxItemTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <CheckBox Grid.Column="0" Style="{StaticResource RoundCheckBoxStyle}" Checked="CheckedFunction" Unchecked="UnCheckedFunction" IsChecked="False"/>
                <TextBlock Grid.Column="1" Text="{Binding}" Margin="0,0,5,0" />
            </Grid>
        </DataTemplate>

    </Window.Resources>
    <Grid>
        <Label Content="Custom:" HorizontalAlignment="Left" Margin="30,25,0,0" VerticalAlignment="Top" FontSize="16" FontWeight="Bold"/>
        <Button Template="{StaticResource LoadingButtonTemplate}" Click="SearchButton_Clicked" HorizontalAlignment="Left" Margin="48,61,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.092,-0.076" Height="36" Width="27"/>
        <TextBox x:Name="textBox" PreviewMouseDown="TextBox_PreviewMouseDown" HorizontalAlignment="Left" Margin="73,69,0,0" TextWrapping="Wrap" Text="Search" VerticalAlignment="Top" Width="280" Height="20"/>
        <ListBox x:Name="listBox" ItemTemplate="{StaticResource ListBoxItemTemplate}" Margin="66,102,83,68"/>
        <Button Content="Save" Click="SaveButton_Clicked" HorizontalAlignment="Left" Margin="184,258,0,0" VerticalAlignment="Top"/>
    </Grid>
</Window>
