How Now when base window load what is state of focus?

  • Thread starter Thread starter RezaJJ
  • Start date Start date
R

RezaJJ

Guest
Hello to all

First of all I am from Iran and I Cant Speak English Very Good sorry for this.

I have two windows and in first window i have button which has trigger mouse over(storyboard LinearGradientBrush changing) and work correctly.(in first load of first window without show second window work correctly)

when I open second window and close it storyboard stay in first mode(i mean when second window close sotoryboard mode stay on mouse over).


by below code i get exception so i cancel this code

private void BrowseButton_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{

FileFinder FileFinderLiveRelationship = new FileFinder();
FileFinderLiveRelationship.ShowDialog();

(Resources["BrowseButtonMouseLeave"] as Storyboard).Begin();

}

by change focus item in first window before show second window this storyboard reverse and is good look below code

private void BrowseButton_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{

SearchComboBox.Focus();
FileFinder FileFinderLiveRelationship = new FileFinder();
FileFinderLiveRelationship.ShowDialog();

}

On first loading window None of first window item not in focus and this is good(i mean by mouse over and leave story board of button work good)and I want this

But when i open and close second window button lost focus and must be use tab or click to focus and then storyboard work i want stoaryboard working such as first base window load and all item on first window dont have focus

thanks alot

Continue reading...
 
Back
Top