I have the following code in my C# WPF MVVM application.

```
public RelayCommand PolishCommand
    {
        get
        {
            polishcommand = new RelayCommand(e =>
            {

                PolishedWeightCalculatorViewModel model = new PolishedWeightCalculatorViewModel(outcomeIndex, OutcomeSelectedItem.RoughCarats);
                PolishedWeightCalculatorView polish = new PolishedWeightCalculatorView(model);
                bool? result = polish.ShowDialog();
                if (result.HasValue)
                {

```

But i came to know that, calling a window from viewmodel is wrong one in MVVM pattern.

Also stated in the below link.

[M-V-VM Design Question. Calling View from ViewModel](https://stackoverflow.com/questions/303006/m-v-vm-design-question-calling-view-from-viewmodel)

Please help me anybody by providing an alternate solution.

Thanks in advance.