Setting TableCellProperties

3 posts, 1 answers
  1. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    Aug 2011

    Posted 15 Dec 2015 Link to this post

    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. Answer
    Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 17 Dec 2015 Link to this post

    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
  3. DevCraft banner
  4. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    Aug 2011

    Posted 05 Jan in reply to Tanya Link to this post

    Perfect.. works well thanks
Back to Top