Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                Stream      stream = File.Open("Background.jpg", FileMode.Open);
                BitmapImage imgsrc = new BitmapImage();
                imgsrc.BeginInit();
                imgsrc.StreamSource = stream;
                imgsrc.EndInit();

                imgBackground.Source = imgsrc;
            }
            catch (IOException) { }

            _viewModel = TryFindResource(ViewModelProviderKey) as SpinnerViewModel;
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                Stream stream = File.Open("Background.jpg", FileMode.Open);
                BitmapImage imgsrc = new BitmapImage();
                imgsrc.BeginInit();
                imgsrc.StreamSource = stream;
                imgsrc.EndInit();

                imgBackground.Source = imgsrc;
            }
            catch (IOException) { }

            _viewModel = TryFindResource(ViewModelProviderKey) as SpinnerViewModel;
        }