MouseOver
onのときにテキストをポップアップするようにコーディングしていToggleButton
ます。私もそれを手に入れましたが、本当の問題は、ポップされたテキストが一定に保たれないことです。つまり、ToggleButton
. もう1つ、ポップされたテキストはToggleButton
それ自体に表示されますが、その下にある必要があります。どうすればこれを取り除くことができますか?
これが私のコードの外観です
<ToggleButton x:Name="btn" Width="20" Height="15">
<Image Source="../Images/flag_orange.ico"/>
</ToggleButton>
<Popup x:Name="popUp" IsOpen="{Binding IsChecked, ElementName=btn, Mode=TwoWay}"
StaysOpen="False" PlacementTarget="{Binding ElementName=btn}"
Placement="Bottom" PopupAnimation="Slide" HorizontalOffset="-5"
VerticalOffset="3">
<Border Background="DarkGray">
<TextBox Text="Its a place holder for user notes" x:Name="tbText"/>
</Border>
</Popup>
<TextBlock x:Name="tbTextBlock"
Visibility="{Binding Path=IsMouseOver,ElementName=btn,Mode=OneWay,
Converter={StaticResource BoolToVisibilityConverter}}"
Text="{Binding ElementName=tbText, Path=Text, Mode=TwoWay}" />