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

Customize cell selected border

6 Answers 188 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Goran
Top achievements
Rank 1
Goran asked on 18 May 2012, 05:55 PM
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?

6 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 19 May 2012, 08:48 AM
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 >>

0
Goran
Top achievements
Rank 1
answered on 22 May 2012, 12:18 PM
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
0
Dimitrina
Telerik team
answered on 24 May 2012, 09:59 AM
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 >>

0
Goran
Top achievements
Rank 1
answered on 24 May 2012, 06:41 PM
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
0
Accepted
Vanya Pavlova
Telerik team
answered on 25 May 2012, 09:05 AM
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 >>

0
Goran
Top achievements
Rank 1
answered on 25 May 2012, 10:40 AM
Hi Vanya,

so basically I need to apply to each column cell style. Thanks for the information.
Tags
TreeListView
Asked by
Goran
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Goran
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or