<UserControl x:Class="CustomControls.LabeledCheckbox"
             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:CustomControls"
             mc:Ignorable="d" 
             d:DesignHeight="40" d:DesignWidth="200">

       
    <Grid>
        <StackPanel x:Name="LayoutRoot" Orientation="Horizontal">
            <Border CornerRadius="5" BorderThickness="0" ClipToBounds="true">
                <CheckBox x:Name="Data" VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding IsChecked}"  IsThreeState="False"  Checked="CheckBox_Checked">
                    <CheckBox.LayoutTransform>
                        <ScaleTransform ScaleX="1.5" ScaleY="1.5" />
                    </CheckBox.LayoutTransform>
                </CheckBox>
            </Border>
            <TextBlock x:Name="Label" Padding="10,0,0,0" Text="{Binding Text}" Foreground="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}" Width="auto" Height="auto" PreviewMouseDown="TextBlock_PreviewMouseDown"/>
        </StackPanel>
    </Grid>
</UserControl>
