<UserControl x:Class="BeWo.View.Controls.SingleSupportConceptSelectionControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:localsearch="clr-namespace:BeWo.View.Search"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             mc:Ignorable="d">

    <Grid Background="{DynamicResource SupportConceptListBrush}" MouseDown="btnSelectSupportConcept_Click" x:Name="mainGrid">
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid >
            <Border x:Name="ItemContent"  MinHeight="25">
                <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,2,1,2" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
						<ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal">
                        <Image x:Name="img" Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" Height="20" VerticalAlignment="Center" HorizontalAlignment="Left" Width="Auto" Visibility="Hidden" />
                        <TextBlock>
                            <Hyperlink x:Name="NameAsLink" Click="Hyperlink_OnClick" Foreground="#00000000" Cursor="Arrow">
                                <TextBlock FontSize="14" Foreground="#FFD2D2D2" x:Name="customerText" Tag="{Binding}" Margin="3 2" Text="{Binding CustomerName}" VerticalAlignment="Center" TextWrapping="Wrap" />
                            </Hyperlink>
                        </TextBlock>
                    </StackPanel>

                  <TextBlock Grid.Row="1" Grid.ColumnSpan="2" FontSize="12" x:Name="supportConceptText" Margin="3 2" Text="{Binding SupportConceptName}" VerticalAlignment="Center" Foreground="{Binding NodeForegroundBrush}" />
                    <TextBlock Grid.Row="2" Grid.ColumnSpan="2" FontSize="12" Foreground="#FFA0A0A0" x:Name="costBearerText" Margin="3 2" Text="{Binding CostBearerName}" VerticalAlignment="Center" />
                    <Button Grid.Column="2" Grid.RowSpan="3" x:Name="btnSelectSupportConcept"
                    		ToolTip="Hilfeplan auswählen" Tag="{Binding}" Width="26" Height="Auto"  Click="btnSelectSupportConcept_Click" Margin="0">
                        <Border Grid.RowSpan="2" Margin="0"  HorizontalAlignment="Center" VerticalAlignment="Center" >
                            <Canvas VerticalAlignment="Center" HorizontalAlignment="Center" Width="20" Height="20" Margin="0,0,0,0" >
                                <Ellipse x:Name="lupe1" Stroke="#FFFFFFFF" Height="14" Width="14" StrokeThickness="2" Fill="{x:Null}" />
                                <Line x:Name="lupe2" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFFFFFF" Canvas.Left="10" Canvas.Top="11.4" Y1="0" Y2="6" StrokeThickness="3" X2="5" />
                            </Canvas>
                        </Border>
                    </Button>
                </Grid>
            </Border>
        </Grid>
        <Popup x:Name="popupSupportConcepts" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="1" Height="400" >
			<localsearch:SupportConceptSearchView x:Name="SearchView" ShowFilterPanel="True" ItemSelected="SupportConceptSearchView_ItemSelected" SearchMode="ActiveCostbearer2SupportConcepts" />
		</Popup>
	</Grid>
</UserControl>