OverviewFilesCommitsIssuesDocsReleasesPeers

ifsrenderer-linux / WpfDisplay / Views / ConnectionArrow.xaml

42 lines · xaml ref:
<UserControl x:Class="WpfDisplay.Views.ConnectionArrow"
             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:conv="clr-namespace:WpfDisplay.Converters"
             mc:Ignorable="d" 
             x:Name="connectionArrow" 
             Cursor="Hand"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Style TargetType="Path">
            <Style.Triggers>
                <!--Shadow effect when selected-->
                <DataTrigger Binding="{Binding Path=IsSelected, FallbackValue=False}" Value="True">
                    <Setter Property="Effect">
                        <Setter.Value>
                            <DropShadowEffect ShadowDepth="5" Direction="-90" BlurRadius="20"/>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <Grid>
        <!--Transparent area around arrow for easier clicking-->
        <Path x:Name="arrowClickArea"
            StrokeThickness="20"
            Stroke="Transparent"/>
        <!--Arrow body-->
        <Path x:Name="arrowBody"
            Stroke="White"
            StrokeThickness="2"/>
        <!--Arrow head-->
        <Path x:Name="arrowHead"
            Stroke="White" 
            StrokeThickness="2"/>
    </Grid>
</UserControl>