public static ClientSettings Show(Window owner, ClientSettings clientSettings)
 {
     var window = new SettingsWindow
     {
         Owner = owner,
         WindowStartupLocation = WindowStartupLocation.CenterOwner,
         ResizeMode = ResizeMode.NoResize,
         SizeToContent = SizeToContent.WidthAndHeight,
         _clientSettings = clientSettings
     };
     window.UpdateForm();
     return window.ShowDialog() == true ? window._clientSettings : null;
 }
        public static SettingsWindowViewModel Show(Window owner, SettingsWindowViewModel viewModel)
        {
            var window = new SettingsWindow
            {
                Owner = owner,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                ResizeMode            = ResizeMode.NoResize,
                SizeToContent         = SizeToContent.WidthAndHeight
            };

            window.SetViewModel(viewModel);
            return(window.ShowDialog() == true?window.GetViewModel() : null);
        }
Ejemplo n.º 3
0
        public static ClientSettings Show(Window owner, ClientSettings clientSettings)
        {
            var window = new SettingsWindow
            {
                Owner = owner,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                ResizeMode            = ResizeMode.NoResize,
                SizeToContent         = SizeToContent.WidthAndHeight,
                _clientSettings       = clientSettings
            };

            window.UpdateForm();
            return(window.ShowDialog() == true ? window._clientSettings : null);
        }