码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2016-06-15 09:17:14      阅读:129      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!