private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                string path = Environment.CurrentDirectory;
                // \Images\image1.jpg
                //navigator = new ImageNavigator();
                //navigator.AddImage(new BitmapImage(new Uri($@"{path}\Images\image1.jpg")));
                //navigator.AddImage(new BitmapImage(new Uri($@"{path}\Images\image2.jpg")));
                //navigator.AddImage(new BitmapImage(new Uri($@"{path}\Images\image3.png")));

                // if images are embedded resources - embedded inside the assembly -
                // in it's properties marked as Resources, and don't copy
                navigator = new ImageNavigator();
                navigator.AddImage(new BitmapImage(new Uri($@"/Images/image1.jpg", UriKind.Relative)));
                navigator.AddImage(new BitmapImage(new Uri($@"/Images/image2.jpg", UriKind.Relative)));
                navigator.AddImage(new BitmapImage(new Uri($@"/Images/image3.png", UriKind.Relative)));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.InnerException.Message);
            }
        }
Example #2
0
 public void SetUp()
 {
     _nav = new ImageNavigator();
 }