While resizing animation is applied text of button is lost.
I want to show the full text on button in panel while resizing animation to panel in moueseEnter event is applied on panel.
private void LeftPanelMouseEnter(object sender, MouseEventArgs e)
{
this.RegisterName(LeftPanel.Name, LeftPanel);
DoubleAnimation dbani = new DoubleAnimation();
dbani.From = 24;
dbani.To = LeftPanelMaxWidth;
dbani.Duration = new Duration(TimeSpan.FromSeconds(.7));
Storyboard.SetTargetName(dbani, LeftPanel.Name);
Storyboard.SetTargetProperty(dbani, new PropertyPath(Border.WidthProperty));
Storyboard myWidthAnimatedButtonStoryboard = new Storyboard();
myWidthAnimatedButtonStoryboard.Children.Add(dbani);
myWidthAnimatedButtonStoryboard.Begin(LeftPanel);
selectedButton.Margin = new Thickness(24, 0, 0, 0);
diagnosisButton.Margin = new Thickness(24, 0, 0, 0);
firmwareButton.Margin = new Thickness(24, 0, 0, 0);
readerSettingButton.Margin = new Thickness(24, 0, 0, 0);
logoPanel.Margin = new Thickness(24, 0, 0, 0);
}