While some of the comments suggest slightly more advanced solutions (e.g. using DataTriggers). I would suggest (at least to start with) you simply need to add a binding for the button content. Then you can add a property to the view-model and update it via the command.
In your case you are using Material Design content.
So in your view-model, you would want to include an icon property:
using MaterialDesignThemes.Wpf;
public PackIconKind IconKind
{
get { return _IconKind; }
set { SetField(ref _IconKind, value); }
}
private PackIconKind _IconKind = PackIconKind.LanDisconnect;
See this reference for the SetField method
Then change your button XAML to this:
<Button Command="{Binding MyCommand}" Width="100" Height="32">
<materialDesign:PackIcon Kind="{Binding IconKind}" />
</Button>
This sets up the binding for your icon in the button. Now the view-model can change this Kind
whenever it wants. I prefer to setup commands in the constructor. I first have a command property as follows:
public ICommand MyCommand { get; }
and in the constructor:
MyCommand = new RelayCommand(UpdateIcon);
then add the UpdateIcon method in to the view-model. This method can then be called from other places (not just the button command).
protected void UpdateIcon()
{
IconKind = MaterialDesignThemes.Wpf.PackIconKind.LanConnect;
}