public static System.Windows.Controls.Image ToImage(this PokemonId pid) { System.Windows.Controls.Image img = new System.Windows.Controls.Image(); img.Source = pid.ToBitmap().loadBitmap(); var tt = new ToolTip(); tt.Content = pid.ToString(); img.ToolTip = tt; return(img); }
public static System.Windows.Controls.Image ToImage(this PokemonId pid) { var img = new System.Windows.Controls.Image { Source = pid.ToBitmap().LoadBitmap() }; var tt = new ToolTip { Content = $"{pid} ({DateTime.Now.ToString("HH:mm:ss")})" }; img.ToolTip = tt; return(img); }
public static BitmapSource ToSource(this PokemonId pid) { return(pid.ToBitmap().LoadBitmap()); }