Customize cell selected border

7 posts, 1 answers
  1. Goran
    Goran avatar
    77 posts
    Member since:
    Feb 2011

    Posted 18 May 2012 Link to this post

    Currently my task is to remove the rounding border around the cell. How to do this? I am a very long time WinForms developer that is getting used to xaml now.

    I also imagine that in some later scenarios I would want to emphasize the border, maybe with different coloring, etc. So this is the similar question as above.

    When I inspect the visual tree, I see that structure goes like this: PART_MasterGridContainer -> HierartchyBackground -> PART_ItemsScrollViewer -> PART_RootPanel -> ScrollContentPresenter -> PART_GridViewVirtualizingPanel -> TreeListViewRow -> Border-> SelectiveScrollingGrid -> PART_DataCellsPresenter -> Grid -> ItemsPresenter -> TreeListCellsPanel -> GridViewCell

    I have searched through TreeListViewRow template that is located in Themes.Implicit project, and I found PART_DataCellsPresenter in it, but thats far as I could get. I see that there is also a GridViewCell implicit style, but that would mean I would change this for each GridViewCell (even for the GridView control). So, how do I connect these template into one style that I will use explicitly?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 19 May 2012 Link to this post

    Hi,

    In this help article you can find out how to remove the border of the current cell.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Goran
    Goran avatar
    77 posts
    Member since:
    Feb 2011

    Posted 22 May 2012 Link to this post

    Hi Didie,

    When I modify TreeListViewRow and GridViewcell styles, how would I wire them up this to my explicit RadTreeListView style? I don't want them to be applied everywhere. Btw, I am modifying styles from Themes.Implicit project.

    Regards,
    Goran
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 24 May 2012 Link to this post

    Hello Goran,

     In case of using Themes.Implicit, you should add BasedOn="{StaticResource GridViewCellStyle}" to the Style definition you have.
    For example:

    <Style TargetType="GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
         ....      
    </Style>


    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Goran
    Goran avatar
    77 posts
    Member since:
    Feb 2011

    Posted 24 May 2012 Link to this post

    Hi Didie,

    either you misunderstood me, or I don't understand you., :) You gave me an example how to extend your implicit style, correct? If you look at the Themes.Implicit, you will see that all style are "unwired". For example, TreeListVIewStyle doesnt have any reference to TreeListViewRowStyle, also TreeListViewStyle doesn't have any reference to GridViewCell style.

    So, If I make my own TreeListViewStyleEx (based on TreeListViewStyle), TreeListViewRowStyleEX (based on TreeListViewRowStyle) and GridViewCellStyleEx style (based on GridViewCellStyle), how would I apply these 3 styles to only one TreeListVIew control  (ex the one that is located on ViewA), while all other Views will still have original implicit styles applied?

    Regards,
    Goran
  7. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 25 May 2012 Link to this post

    Hello Goran,

     

    If your  styles TreeListViewStyleEx, TreeListViewRowStyleEX, GridViewCellStyleEx  are implicit (without specifying the x:Key attribute) they will be applied to all TreeListView controls in your application.
    If you want to apply them only to a specific RadTreeListView control you should set them explicitly:

    <telerik:RadTreeListView Style="{StaticResource TreeListViewStyleEx 
    }"
    RowStyle="{StaticResource TreeListViewRowStyleEX 
    }"
    >
          <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn CellStyle="{StaticResource GridViewCellStyleEx  
    }"
    />
    ...
          </telerik:RadTreeListView.Columns>
    </telerik:RadTreeListView>


    The rest RadTreeListView controls will keep the original styles applied. 
     

    Regards,
    Vanya Pavlova
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Goran
    Goran avatar
    77 posts
    Member since:
    Feb 2011

    Posted 25 May 2012 Link to this post

    Hi Vanya,

    so basically I need to apply to each column cell style. Thanks for the information.
Back to Top
UI for WPF is Visual Studio 2017 Ready