Hello Sodi We,
In your scenario it is best to apply different styles to the Maximized
items, like in the attached example.
However, if you prefer to control the Opacity of the button from code-behind you should keep in mind that during the initialization of the items, the MaximizeToggleButton
element isn't initialized and you won't be able to access it. Therefore this approach is only applicable when the Items collection is generated and initialized. Then the TileStateChanged()
event can be handled to control the opacity of the MaximizeToggleButton
element like so:
sender, Telerik.Windows.RadRoutedEventArgs e)
RadTileViewItem item = e.Source
ToggleButton maximizeToggleButton = item.FindChildByType<ToggleButton>();
(item.TileState == TileViewItemState.Maximized)
maximizeToggleButton.Opacity = 0;
maximizeToggleButton.Opacity = 1;
However, if you decide to use this approach, you will need to manually apply a different style (without the MaximizeToggleButton)
to the initially maximized item. Therefore I would suggest you to go with the first approach, illustrated in the attached project.
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?
Telerik Public Issue Tracking
system and vote to affect the priority of the items