Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
It only works the first time
posted

Hello,

I have the following problem:

I have a grid with a column data and a button, when I click on the button, open a modal window (XamDialogWindow)

When I press the first time opens the modal window: perfect.

After closing the window (pulse de close button).

From that moment, when I press a button again to see the detail of the line, not re-open the modal window.

The code is as follows:

 <ig:XamDialogWindow Name="win" Visibility="Collapsed">
                <ContentControl>
                     <Grid Width="Auto" Height="Auto">

                     all controls ...

 </Grid>    
                </ContentControl>
            </ig:XamDialogWindow>

and

on button clik:

win.Width = 700
win.Height = 600
win.StartupPosition = Infragistics.Controls.Interactions.StartupPosition.Center
win.MaximizeButtonVisibility = Windows.Visibility.Collapsed
win.MinimizeButtonVisibility = Windows.Visibility.Collapsed
win.ModalBackgroundEffect = Nothing
win.IsModal = True
win.Visibility = Windows.Visibility.Visible

Version: 2011

thanks

Parents
  • 8607
    Offline posted

    Hello jcsanchezr,

    Have you tried using the Show() method instead of setting the visibility?

    I made a sample application (in C#, but it's very similar to your code).  Here's my button click method:

            private void button1_Click(object sender, RoutedEventArgs e)
            {
                win.Width = 700;
                win.Height = 600;
                win.StartupPosition = Infragistics.Controls.Interactions.StartupPosition.Center;
                win.MaximizeButtonVisibility = System.Windows.Visibility.Collapsed;
                win.MinimizeButtonVisibility = System.Windows.Visibility.Collapsed;
                win.IsModal = true;
                win.ModalBackgroundEffect = null;
                win.Show();
            }

    Let me know if this works for you.  I can attach my sample project if it would help.


    Elizabeth Albert
    Localization Engineer

Reply Children
No Data