Created
January 6, 2014 15:12
-
-
Save JohanLarsson/8284177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Style x:Key="EditableTextBlockStyle" TargetType="TextBox"> | |
| <Setter Property="OverridesDefaultStyle" Value="True"/> | |
| <Setter Property="BorderBrush" Value="{x:Null}"/> | |
| <Setter Property="Background" Value="{x:Null}"/> | |
| <Setter Property="BorderThickness" Value="0"/> | |
| <Setter Property="Margin" Value="-2,-1,-2,-1"/> | |
| <Setter Property="AllowDrop" Value="true"/> | |
| <Setter Property="MaxLines" Value="1"/> | |
| <Setter Property="FocusVisualStyle" Value="{x:Null}"/> | |
| <Setter Property="VerticalAlignment" Value="Top"/> | |
| <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/> | |
| <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> | |
| <Setter Property="Focusable" Value="True"/> | |
| </Style> | |
| <Style TargetType="{x:Type controls:EditableTextBlock}" BasedOn="{StaticResource {x:Type TextBox}}"> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="{x:Type controls:EditableTextBlock}"> | |
| <TextBox Text="{TemplateBinding Text}" Style="{StaticResource EditableTextBlockStyle}"/> | |
| </ControlTemplate> | |
| </Setter.Value> | |
| </Setter> | |
| </Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment