Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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);
                  }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900