in xzaml
<UserControl.DataContext>
<vm:InstallVM/>
</UserControl.DataContext>
and yes the code
try
{
Elfenlied = WeakReferenceMessenger
.Default
.Send<VSInstalledMessage>();
}
catch(Exception ex)
{
}
so from the downloadvm it generates the message
the class it attaches to is just a holder for the messanger from the tool kit so all vsinstallmessage holds is this,
public class VSInstalledMessage : RequestMessage<string>
{
}
then when download is clicked it genreates the vsisinstalled public string in download
here is a snippet of it
public DownloadVM()
{
cvs.Source = GetData();
WeakReferenceMessenger.Default.Register<DownloadVM, VSInstalledMessage>(this, (r, m) =>
{
m.Reply(r.vsinstalledstring);
});
spotifydownloader.checkvm(elfendownload.IsVC2015Installed());
}
public bool Vs2015Installed_CanExecute()
{
Test = spotifydownloader.test;
if (spotifydownloader.test == "True")
{
vsinstalledstring = "Already Installed";
return false;
}
else
{
}
vsinstalledstring = "Install Vs";
return true;
}
so from here it generates what it should be and then will send to installvm when clicked on the result of this and i want to add this to the button text
because when i wire it up correctly it will check if its installed and if not the button will be enabled if its already installed it then it greys it out with already installed.
and if its not its active we install it once its installed it checks again and disables it but doing 1 step at a time at the moment
if that makes better sense ?