0

Hello guys is there any way to run the WPF storyboard using code in VB.NET? If yes how can we do it? And if i am not gonna get answer to this question too then let me know. Thank you!

1
Contributor
3
Replies
6
Views
5 Years
Discussion Span
Last Post by Sahil89
0

I guess daniwebers dnt knw about WPF so gonna post it in expression forum. :D

2

Class MainWindow
Private Sub rectangle_MouseLeftButtonDown(ByVal sender as Object, ByVal e as System.Windows.Input.MouseButtonEventArgs)
Dim sb As Storyboard = DirectCast(FindResource("Storyboard1"), Storyboard)
sb.Begin()
End Sub
End Class

Finally I got the solution.

2

Hello friends this post is for those who want to add/remove reference resource dictionary at runtime you can do it as follows

Dim skin = New ResourceDictionary()
skin.Source = New Uri("Green.xaml", UriKind.Relative)
Application.Current.Resources.MergedDictionaries.Clear()
Application.Current.Resources.MergedDictionaries.Add(skin)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.