編集:質問の元の前提が間違っていたので、質問を修正しました:
基本的に、マウスが含まれているユーザーコントロールの上にある場合にのみ、ボタンが表示されるようにします。ここに私が持っているものの単純化されたバージョンがあります:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="MyNamespace.MyUserControl"
x:Name="myUserControl">
<Textbox>Some Text</Textbox>
<Button Visibility="{Binding ElementName=myUserControl, Path=IsMouseOver, Converter={StaticResource mouseOverVisibilityConverter}}" />
</UserControl>
これは、マウスがテキスト ボックス上にある場合に機能しますが、ユーザー コントロールの他の場所には機能しません。