protected override void OnInitialize()
    {
        base.OnInitialize();
        PackageDefinitions = packageDefinitionDiscovery
          .GetPackages()
          .OrderBy(p => p.SortOrder)
          .Select(x => new PackageDefinitionBindable
              {
                  ImageUrl = ResourceResolver.GetPackUrl(x.Image),
                  ToolTip = x.ToolTip,
                  Enabled = !x.Disabled,
                  Selected = x.SelectedByDefault,
                  Status = x.Status ?? (x.SelectedByDefault ? "Install" : "Update"),
                  Name = x.Name,
              }).ToList();

        IsInstallEnabled = PackageDefinitions.Any(pd => pd.Selected);

        PackageDefinitions.BindActionToPropChanged(() =>
        {
            IsInstallEnabled = PackageDefinitions.Any(p => p.Selected);
        }, "Selected");
    }
    public SelectItemsViewModel(PackageDefinitionService packageDefinitionDiscovery, IEventAggregator eventAggregator)
    {
        this.eventAggregator = eventAggregator;
        PackageDefinitions = packageDefinitionDiscovery
            .GetPackages()
            .OrderBy(p=>p.SortOrder)
            .Select(x=> new PackageDefinitionBindable
                {
                    ImageUrl = "pack://application:,,,/PlatformInstaller;component" + x.Image,
                    ToolTip = x.ToolTip,
                    Enabled = !x.Disabled,
                    Selected = x.SelectedByDefault,
                    Status = x.Status ?? (x.SelectedByDefault ? "Install" : "Update"),
                    Name = x.Name,
                }).ToList();

        IsInstallEnabled = PackageDefinitions.Any(pd => pd.Selected);

        PackageDefinitions.BindActionToPropChanged(() =>
        {
            IsInstallEnabled = PackageDefinitions.Any(p => p.Selected);
        }, "Selected");
    }