markus / KCOM / Controls / ExtendTextBox.xaml @ df2e7646
이력 | 보기 | 이력해설 | 다운로드 (3.16 KB)
1 |
<UserControl x:Name="userControl" x:Class="KCOM.Controls.ExtendTextBox" |
---|---|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
xmlns:local="clr-namespace:KCOM.Controls" |
7 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
8 |
mc:Ignorable="d" |
9 |
d:DesignHeight="450" d:DesignWidth="120"> |
10 |
<UserControl.Resources>
|
11 |
<telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibility"/> |
12 |
<telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibility"/> |
13 |
</UserControl.Resources>
|
14 |
<Grid>
|
15 |
<Grid.ColumnDefinitions>
|
16 |
<ColumnDefinition Width="Auto"/> |
17 |
<ColumnDefinition Width="Auto"/> |
18 |
</Grid.ColumnDefinitions>
|
19 |
<TextBlock x:Name="txtBox" |
20 |
Text="{Binding Text, ElementName=userControl}" TextWrapping="WrapWithOverflow" Margin="5,3,3,3"/> |
21 |
<Button Grid.Column="1" x:Name="btExtend" Height="20" Content="+" VerticalAlignment="Top" Click="Button_Click"/> |
22 |
<!--<Expander IsExpanded="False">
|
23 |
<Expander.Template>
|
24 |
<ControlTemplate TargetType="{x:Type Expander}">
|
25 |
<Border>
|
26 |
<Grid>
|
27 |
<Grid.RowDefinitions>
|
28 |
<RowDefinition Height="Auto"/>
|
29 |
<RowDefinition/>
|
30 |
</Grid.RowDefinitions>
|
31 |
<ContentPresenter x:Name="ExpandSite" Grid.RowSpan="2"/>
|
32 |
<ToggleButton x:Name="HeaderSite"
|
33 |
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
34 |
Content="{TemplateBinding Header}" HorizontalAlignment="Left"
|
35 |
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Background="{x:Null}" BorderBrush="{x:Null}" />
|
36 |
|
37 |
</Grid>
|
38 |
</Border>
|
39 |
</ControlTemplate>
|
40 |
</Expander.Template>
|
41 |
<Expander.Header>
|
42 |
<TextBlock Visibility="{Binding IsExpanded, RelativeSource={RelativeSource AncestorType={x:Type Expander}, Mode=FindAncestor},
|
43 |
Converter={StaticResource InvertedBooleanToVisibility}}" Height="24"
|
44 |
TextTrimming="WordEllipsis" FlowDirection="LeftToRight" TextWrapping="NoWrap"
|
45 |
Text="{Binding Text, ElementName=userControl}"/>
|
46 |
</Expander.Header>
|
47 |
<TextBlock x:Name="txtBox" Visibility="{Binding IsExpanded, RelativeSource={RelativeSource AncestorType={x:Type Expander}, Mode=FindAncestor},
|
48 |
Converter={StaticResource BooleanToVisibility}}"
|
49 |
Text="{Binding Text, ElementName=userControl}" TextWrapping="Wrap" Margin="5,3,3,3" FlowDirection="LeftToRight"/>
|
50 |
</Expander>-->
|
51 |
</Grid>
|
52 |
</UserControl>
|