日期:2014-05-17 浏览次数:21144 次
<Window x:Class="_0_0_测试.MainTest"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:zc="clr-namespace:Z.Core.WPF.Controls;assembly=Z.Core.WPF"
xmlns:local="clr-namespace:_0_0_测试"
Title="MainTest" Height="600" Width="600">
<StackPanel>
<Button Content="选择内容" Click="Button_Click_1" />
<zc:ZRichTextBox x:Name="richTextBox"
Height="200" Margin="10,10,10,5"
ToolbarBackground="#FFD2CB84" ToolbarBorderBrush="#FFC6BE75" ToolbarBorderThickness="1,1,1,0"
CodeControlsVisibility="Visible" >
<zc:ZRichTextBox.Resources>
<zc:IEditorConverter x:Key="IEditorConverter" />
<zc:FindReplaceMgr x:Key="FRep"
InterfaceConverter="{StaticResource IEditorConverter}"
CurrentEditor="{Binding RelativeSource={RelativeSource AncestorType={x:Type zc:ZRichTextBox}}}"
AllowReplace="True" />
</zc:ZRichTextBox.Resources>
<zc:ZRichTextBox.CommandBindings>
<local:StaticResourceEx ResourceKey="FRep" Path="FindBinding" />
<local:StaticResourceEx ResourceKey="FRep" Path="ReplaceBinding" />
<local:StaticResourceEx ResourceKey="FRep" Path="FindNextBinding" />
</zc:ZRichTextBox.CommandBindings>
<zc:ZRichTextBox.Inpu