我只找到一個辦法:如何選擇TextBock中的文本?
<TextBox Text="Text!"
IsReadOnly="True"
IsTabStop="False"
BorderThickness="0"
>
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsFocused" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<TextBlock Text="{TemplateBinding Text}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</MultiTrigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
還有另一種選擇不是那麼大?
是的。充滿幸福,我們必須添加BorderThickenes = 0 – Mediator 2010-10-03 08:07:58