<UserControl x:Class="PDF_Office.CustomControl.ToastControl" 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:local="clr-namespace:PDF_Office.CustomControl" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Name="Toast" Width="auto" Height="auto" d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" IsVisibleChanged="Toast_IsVisibleChanged" Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=Visibility}" mc:Ignorable="d"> <Border Name="tipBorder" HorizontalAlignment="Center" Background="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=Background}" CornerRadius="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=CornerRadius}"> <TextBlock Name="txtTip" Padding="6,2,6,2" HorizontalAlignment="Center" Background="Transparent" FontSize="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=FontSize}" Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=Foreground}" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ToastControl}, Path=StringContent}" /> </Border> </UserControl>