假设在同一程序集中的XAML文件中使用了SelectTextOnFocusBehavior类,则需要执行以下操作:
<Application x:Class="MyApplication.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:JulMar.Windows.Interactivity"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="TextBox">
<Setter Property="local:SelectTextOnFocusBehavior.YourProperty" Value="YourValue" />
</Style>
</Application.Resources>
</Application>