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

Changing style to a RadTileViewItem

9 Answers 172 Views
TileView
This is a migrated thread and some comments may be shown as answers.
hightow
Top achievements
Rank 1
hightow asked on 26 Aug 2010, 01:09 PM
I have customized the RadTileViewItems through RadTileView.ItemTemplate-tag in the xaml, i.e. added some more buttons and labels as I saw fit. The problem I see now is how I can customize the RadTileViewItem  as I dont have references to that in the xaml.

<telerikNavigation:RadTileView.ItemTemplate>
   <DataTemplate>
      <Grid>>
          <!-- Buttons and Label -->
      </Grid>
   </DataTemplate>
</telerikNavigation:RadTileView.ItemTemplate>

9 Answers, 1 is accepted

Sort by
0
Viktor Tsvetkov
Telerik team
answered on 26 Aug 2010, 02:03 PM
Hello Helgrim,

Could you please explain more descriptive what you need to do and what do you mean when you say "I dont have references to that in the xaml"?

All the best,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
hightow
Top achievements
Rank 1
answered on 26 Aug 2010, 02:09 PM
In your example-codes you build the xaml like this:
<RadTileView>
   <RadTimeViewItem>...</RadTileViewItem>
   <RadTileViewItem>...</RadTileViewItem>
</RadTileView>

But I have built my xaml like this:
<RadTileView>
    <RadTileView.ItemTemplate>
        <DataTemplate>...</DataTemplate>
    </RadTileView.ItemTemplate>
    <RadTileView.ContentTemplate>
        <DataTemplate>...</DataTemplate>
    </RadTileView.ContentTemplate>
</RadTileView>

As I have no <RadTileViewItem>-tags in my xaml, I find it difficult to know how to change its style.
0
Viktor Tsvetkov
Telerik team
answered on 26 Aug 2010, 02:16 PM
Hello Helgrim,

The idea of the templates is to apply them to some data. If your RadTileView is not databound, or if you do not add items somehow from code behind, then the use of templates is meaningless.

Best wishes,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
hightow
Top achievements
Rank 1
answered on 26 Aug 2010, 02:27 PM
I just wanted to illustrate the structure of my xaml, and have focus on the design and not the data.

I set the .DataContext on the UserControl to a ViewModel in codebehind, and bind the RadTileView in the xaml like this:
<RadTileView ItemsSource="{Binding Path=MyData}">



0
Viktor Tsvetkov
Telerik team
answered on 26 Aug 2010, 02:51 PM
Hi Helgrim,

You have bound the RadTileView, added custom templates - everything is fine. What exactly your problem is? I do not uderstand what you meant with this "The problem I see now is how I can customize the RadTileViewItem  as I dont have references to that in the xaml." ?

Regards,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
hightow
Top achievements
Rank 1
answered on 26 Aug 2010, 03:22 PM
I have attached a picture that might better illustrate what I want to accomplish.

In the left corner highlighted with a red background is my custom template. (A grid with a button and a label)
In the right corner is the standard maximize-togglebutton. How do I customize it. (E.g. change foreground color)

(I'm more and more convinced that I have to solve this in a more "standard" approach)

Thanks for your patience. :)
0
Viktor Tsvetkov
Telerik team
answered on 27 Aug 2010, 02:45 PM
Hello Helgrim,

If you want to change the foreground of the different RadTileViewItems and for example the logic is based on some property of the databound items, you can use ContainerBindings. If you meant something different, could you please be more descriptive?

Best wishes,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
hightow
Top achievements
Rank 1
answered on 01 Sep 2010, 02:09 PM
No, you haven't understood what I want to do here.

So lets start from the beginning, and take it step by step.
In short: I want to customize the MaximizeToggleButton. How do I do that?
0
Viktor Tsvetkov
Telerik team
answered on 01 Sep 2010, 04:51 PM
Hi Helgrim,

If you want to customize the Maximize ToggleButton, you can add custom style to the ItemContainerStyle property of the RadTileView, which you can get if you edit the template of a RadTileViewItem in Blend and then you can remove the RestoreIcon item (which is placed in the default ControlTemplate of the RadTileViewItem) and add your custom Path object.

Regards,
Viktor Tsvetkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
TileView
Asked by
hightow
Top achievements
Rank 1
Answers by
Viktor Tsvetkov
Telerik team
hightow
Top achievements
Rank 1
Share this question
or