This is a migrated thread and some comments may be shown as answers.

Setting TableCellProperties

2 Answers 67 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 15 Dec 2015, 08:42 AM

I am attempting to set the StyleDefinition of a Normal Table so that the Borders are Custom and only Top and Bottom. However I cannot seem to get the xaml correct to achieve this. Any ideas?

 

 

<d:StyleDefinition BasedOnName="TableNormal" DisplayName="Table Grid" IsCustom="False" IsDefault="False" IsPrimary="False" Name="TableGrid" Type="Table" UIPriority="39">
      <d:StyleDefinition.ConditionalTableStylesList>
        <d:ConditionalTableStyleInfo Type="FirstRow">
          <d:ConditionalTableStyleInfo.Style>
            <d:StyleDefinition IsCustom="True" IsDefault="False" IsPrimary="True" Type="Table">
              <d:StyleDefinition.SpanStyle>
                <d:SpanProperties FontWeight="Bold" FontSize="13.33333334" ForeColor="#FFFFFFFF" ThemeForeColor="background1" />
              </d:StyleDefinition.SpanStyle>             
              <d:StyleDefinition.TableCellStyle>
                <d:TableCellProperties Background="#54585A"/>
              </d:StyleDefinition.TableCellStyle>           
            </d:StyleDefinition>
          </d:ConditionalTableStyleInfo.Style>
        </d:ConditionalTableStyleInfo>          
      </d:StyleDefinition.ConditionalTableStylesList>
        <d:StyleDefinition.ParagraphStyle>
            <d:ParagraphProperties LineSpacing="1" LineSpacingType="Auto" SpacingAfter="0" TextAlignment="Center" />
        </d:StyleDefinition.ParagraphStyle>
            <d:StyleDefinition.TableStyle>
                <d:TableProperties Borders="0.6666667,Single,#FF000000,none,," CellPadding="7,0,7,0" TableIndent="0">
                    <d:TableProperties.TableLook>
                        <t:TableLook />
                    </d:TableProperties.TableLook>
                </d:TableProperties>
            </d:StyleDefinition.TableStyle>
            <d:StyleDefinition.TableCellProperties>
                <d:TableCellProperties Background="Coral" Borders="2,Single,#FF833C0B,none,,"></d:TableCellProperties>
                <!--<d:TableCellProperties Borders="0.6666667,None,#FF000000,none,,;0,None,#FF4472C4,accent5,,;0.6666667,None,#FF000000,none,,;0,None,#FF000000,none,," />-->
            </d:StyleDefinition.TableCellProperties>
        </d:StyleDefinition>

2 Answers, 1 is accepted

Sort by
0
Accepted
Tanya
Telerik team
answered on 17 Dec 2015, 04:13 PM
Hi Jeremy,

In order to set the top and bottom borders of all the cells in a table, you could add a conditional style for the banding rows. Please, find attached a sample document, which I created to demonstrate how the style should look like.

Hope this helps.

Regards,
Tanya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jeremy
Top achievements
Rank 1
answered on 06 Jan 2016, 02:48 AM
Perfect.. works well thanks
Tags
RichTextBox
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Jeremy
Top achievements
Rank 1
Share this question
or