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

VSM.GoToState fails in RadTileViewItem

5 Answers 95 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 14 Oct 2009, 10:05 PM
I have created a class that derives from RadTileViewItem which has some VisualStates in it. 

When I call VisualStateManager.GoToState it will only return false stating that it didn't work.  When I try the same code in a plain UserControl class the VisualStateManager works just fine. 

Both RadTileViewItem and UserControl end up deriving from ContentControl so I am not sure why it doesn't work.    There is an internal method on Control called GoToState which makes me belive that it should work.

Any ideas?

I should point out that the reason that I have derived from RadTileViewItem is because I want to put a toolbar in the header area and have the clicks interact with the body of the RadTileViewItem.  It is a nice clean implementation that puts all of the required parts together; so I would prefer not to have to put another UserControl in the RadTileViewItem (which works BTW.)

Cheers,
Clint

5 Answers, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 19 Oct 2009, 11:03 AM
Hi Clint,

There should not be any problems calling the GoToState() method. Two possible mistakes when working with the VisualStateManager are (1) not putting the VisualStateGroups in the root element of the control template, and (2) incorrect property paths in the VisualStates. Can you please check if both of the above requirements are satisfied and let me know if the problem still exists?

Sincerely yours,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 19 Oct 2009, 07:50 PM
Hi Pavel,

Before posting I had ensured that the VSM groups were directly under the LayoutRoot control (the topmost control) and that I had the names correct.   As I sort of mentioned before, the same code works fine when I take it from the RadTileViewItem derived control and placing it in a basic UserControl.

Cheers,
Clint
0
Tihomir Petkov
Telerik team
answered on 22 Oct 2009, 01:07 PM
Hi Clint,

I prepared a sample project with a control inheriting the RadTileViewItem class and calling the GoToState() method did not cause any errors. Please take a look at it and if it is differing from your scenario, modify it so that I can investigate.

Regards,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 23 Oct 2009, 05:18 PM
Hi Tihomir,

I tried your sample and it does work which then lead me to develop a simple sample that follows the scenario that I am using the control.  Since I have a solution to send in I will escalate this by opening a support ticket,

Cheers,
Clint
0
Tihomir Petkov
Telerik team
answered on 24 Oct 2009, 10:40 AM
Hello Clint,

I am closing this thread, we will continue this discussion in the support ticket.

Sincerely yours,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TileView
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Clint Singer
Top achievements
Rank 1
Share this question
or