Last active
December 23, 2015 20:39
-
-
Save julesx/6690778 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; | |
using System.Windows.Media.Imaging; | |
using System.Windows.Navigation; | |
using System.Windows.Shapes; | |
namespace WpfApplication5 | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml | |
/// </summary> | |
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
} | |
private void UIElement_OnMouseEnter(object sender, MouseEventArgs e) | |
{ | |
((Storyboard)FindResource("animate")).Begin(Tab1, true); | |
((Storyboard)FindResource("animate")).Begin(Tab2, true); | |
} | |
private void EventSetter_OnHandler(object sender, MouseEventArgs e) | |
{ | |
var tabItem = (TabItem) sender; | |
if (tabItem.HasAnimatedProperties) | |
{ | |
((Storyboard)FindResource("animate")).Pause(Tab1); | |
((Storyboard)FindResource("animate")).Pause(Tab2); | |
} | |
} | |
private void EventSetter_OnHandler2(object sender, MouseEventArgs e) | |
{ | |
var tabItem = (TabItem) sender; | |
if (tabItem.HasAnimatedProperties) | |
{ | |
((Storyboard)FindResource("animate")).Resume(Tab1); | |
((Storyboard)FindResource("animate")).Resume(Tab2); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment