ucStartEndButton.xaml 2.14 KB
<UserControl x:Class="RoboforkApp.ucStartEndButton"
             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" 
             mc:Ignorable="d" 
             x:Name="StartEndButton">
    <Thumb Name="tmbThumb" DragDelta="tmbThumb_DragDelta" DragCompleted="tmbThumb_DragCompleted">
        <Thumb.Template>
            <ControlTemplate>

                <Grid Name="btnHello"
                      Width="150">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Ellipse Name="eCicle" Grid.Row="0" 
                 Grid.Column="0" 
                 VerticalAlignment="Center" 
                 HorizontalAlignment="Center"
                 Width="50" 
                 Height="50" 
                 Fill="Red" 
                 Stroke="Blue"
                 Cursor="Hand"
                 StrokeThickness="2"/>
                    <TextBlock Grid.Row="0" 
                               Grid.Column="0" 
                               VerticalAlignment="Center" 
                               HorizontalAlignment="Center" 
                               FontSize="35"
                               Foreground="White" FontWeight="Bold"
                               Text="{Binding buttText, ElementName=StartEndButton}" />
                    <TextBlock Grid.Row="0" 
                               Grid.Column="1" 
                               FontSize="15"
                               HorizontalAlignment="Left"
                               VerticalAlignment="Center"
                               Foreground="Gray"
                               Margin="2 0 0 0"
                               Text="{Binding coordString, ElementName=StartEndButton}" />
                </Grid>
            </ControlTemplate>
        </Thumb.Template>
    </Thumb>

</UserControl>