首页 > 其他 > 详细

AvalonEdit 移除自身ScrollViewer (可配合外部自定义ScrollViewer 使用)

时间:2016-06-15 09:16:47      阅读:285      评论:0      收藏:0      [点我收藏+]

 

http://community.sharpdevelop.net/forums/p/11977/42764.aspx#42764

  1:    <Style TargetType="{x:Type AvalonEdit:TextEditor}">
  2:         <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
  3:         <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
  4:         <Setter Property="FlowDirection" Value="LeftToRight"/>
  5:         <!-- AvalonEdit does not support RTL, so ensure we use LTR by default -->
  6:         <Setter Property="Template">
  7:             <Setter.Value>
  8:                 <ControlTemplate TargetType="{x:Type AvalonEdit:TextEditor}">
  9:                     <ContentPresenter Focusable="False"
 10:                         Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TextArea}"
 11:                         >
 12:                     </ContentPresenter>
 13:                 </ControlTemplate>
 14:             </Setter.Value>
 15:         </Setter>
 16:     </Style>

AvalonEdit 移除自身ScrollViewer (可配合外部自定义ScrollViewer 使用)

原文:http://www.cnblogs.com/twzy/p/5586160.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!