Interaction logic for DetailsForm.xaml
Inheritance: SilverFlow.Controls.FloatingWindow
示例#1
0
        private void ShowDetailsForm_Click(object sender, RoutedEventArgs e)
        {
            // If the DetailsForm is not created yet, or it is already closed
              if (detailsForm == null)
              {
            // Create the window
            detailsForm = new DetailsForm();

            // Set detailsForm to null when the window is closed
            detailsForm.Closed += (s, ea) =>
            {
              detailsForm = null;
            };

            // Add the window to the FloatingWindowHost
            host.Add(detailsForm);

            // Restore window size and position
            detailsForm.RestoreSizeAndPosition();

            detailsForm.Show();
              }
        }