Hi there,
I am currently using the http://demos.telerik.com/silverlight/#TransitionControl/FirstLook example as my base for creating a banner at the top of my Silverlight web page. I currently have it set up so that on a timer control, every 4 seconds, it will change to the next to image, but using the selectNext method of the PagerViewModel class. I also have it set up, so that when I mouse over the buttons to change between images (I have removed to backwards and forwards buttons which come with the example) the timer is paused so that you can then select which image you would like to view instead of constantly cycling through it.
However, herein lies my problem. At the moment, the user needs to click on the button to change to that image, I would rather have the user be able to hover their mouse over the button and pause the timer and show the image thats wanted. Now, I have tried to implement this, by changing the base class of PageViewModel to inherit from ListBoxItem, ContentControl, ContentPresenter, UserControl, however, none of these work, as I end up getting an unhandled exception of "ArgumentException was unhandled by user code: Value does not fall within the expected range.". The callstack for this exception is the protected virtual void OnPropertyChanged(PropertyChangedEventArgs args) event of the PagerViewModel class.
If I remove the inherit from the PageViewModel class then everything works fine.
The reason that I want to inherit from one of those types, is that it gives me access to the MouseEnter and MouseLeave events, that I can then add a handler too at run time. Any help would be great. Thanks very much.
Shaun Sharples
I am currently using the http://demos.telerik.com/silverlight/#TransitionControl/FirstLook example as my base for creating a banner at the top of my Silverlight web page. I currently have it set up so that on a timer control, every 4 seconds, it will change to the next to image, but using the selectNext method of the PagerViewModel class. I also have it set up, so that when I mouse over the buttons to change between images (I have removed to backwards and forwards buttons which come with the example) the timer is paused so that you can then select which image you would like to view instead of constantly cycling through it.
However, herein lies my problem. At the moment, the user needs to click on the button to change to that image, I would rather have the user be able to hover their mouse over the button and pause the timer and show the image thats wanted. Now, I have tried to implement this, by changing the base class of PageViewModel to inherit from ListBoxItem, ContentControl, ContentPresenter, UserControl, however, none of these work, as I end up getting an unhandled exception of "ArgumentException was unhandled by user code: Value does not fall within the expected range.". The callstack for this exception is the protected virtual void OnPropertyChanged(PropertyChangedEventArgs args) event of the PagerViewModel class.
If I remove the inherit from the PageViewModel class then everything works fine.
The reason that I want to inherit from one of those types, is that it gives me access to the MouseEnter and MouseLeave events, that I can then add a handler too at run time. Any help would be great. Thanks very much.
Shaun Sharples