|
@@ -0,0 +1,66 @@
|
|
|
|
+<ResourceDictionary
|
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
+ xmlns:cc="clr-namespace:ColorfulEditor.CustomControl">
|
|
|
|
+
|
|
|
|
+ <Style TargetType="{x:Type cc:ItemBlock}">
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type cc:ItemBlock}">
|
|
|
|
+ <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
+ <Grid>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <TextBox Grid.Row="0" DockPanel.Dock="Top" Background="Yellow" Text="{TemplateBinding Text}"></TextBox>
|
|
|
|
+ <DockPanel Grid.Row="1" LastChildFill="True">
|
|
|
|
+ <Border DockPanel.Dock="Left" Width="20" Background="Green"/>
|
|
|
|
+ <ItemsPresenter DockPanel.Dock="Left"/>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ <TextBox Grid.Row="2" DockPanel.Dock="Bottom" Background="blue">></TextBox>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <Style TargetType="{x:Type cc:MessageBlock}">
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type cc:MessageBlock}">
|
|
|
|
+ <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
+ <Grid>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <TextBox Grid.Row="0" DockPanel.Dock="Top" Background="Yellow" Text="{TemplateBinding Text}"></TextBox>
|
|
|
|
+ <DockPanel Grid.Row="1" LastChildFill="True">
|
|
|
|
+ <Border DockPanel.Dock="Left" Width="20" Background="Green"/>
|
|
|
|
+ <ContentPresenter DockPanel.Dock="Left" Content="{TemplateBinding MessageBodyBlock}"/>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ <TextBox Grid.Row="2" DockPanel.Dock="Bottom" Background="blue">></TextBox>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
|
|
+ <Style TargetType="{x:Type cc:BlockEditor}">
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type cc:BlockEditor}">
|
|
|
|
+ <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
+
|
|
|
|
+ </Border>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+</ResourceDictionary>
|