public void SetHostBackgroundImage(string path) { hostWindow.StopBackgroundVideo(); hostWindow.SetBackgroundImage(path); this.Visibility = Visibility.Hidden; this.Visibility = Visibility.Visible; }
public void SetBackgroundImage(string path, double opacity) { StopBackgroundVideo(); if (IsHostBackground) { hostWindow.SetBackgroundImage(path); } else { this.Background = new ImageBrush() { Stretch = Stretch.UniformToFill, ImageSource = new BitmapImage(new Uri(path, UriKind.Relative)), Opacity = opacity }; } SetCurrentWindowToTop(); }