Generator: Make events more general (Image <> FrameworkElement).

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS15]$/Atomix;C40364