You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.4 KiB
67 lines
2.4 KiB
/*************************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2016 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the Microsoft Public
|
|
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
***********************************************************************************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using Xceed.Wpf.Samples.SampleData;
|
|
using System.Windows.Media.Imaging;
|
|
using System.IO;
|
|
using System.Windows.Media;
|
|
|
|
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.SlideShow.Views
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for SlideShow.xaml
|
|
/// </summary>
|
|
public partial class SlideShowView : DemoView
|
|
{
|
|
public SlideShowView()
|
|
{
|
|
InitializeComponent();
|
|
|
|
#if !OPEN_SOURCE
|
|
|
|
ObservableCollection<PictureItem> pictures = new ObservableCollection<PictureItem>();
|
|
for (int i = 1; i <= 9; i++)
|
|
{
|
|
BitmapImage image = new BitmapImage();
|
|
image.BeginInit();
|
|
string filename = ("pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/SlideShow/Resources/photo_" + i + ".jpg");
|
|
image.UriSource = new Uri(filename, UriKind.RelativeOrAbsolute);
|
|
pictures.Add(new PictureItem("Picture " + i , image));
|
|
image.EndInit();
|
|
}
|
|
foreach (PictureItem picItem in pictures)
|
|
{
|
|
SlideShowItem aSlideShowItem = new SlideShowItem();
|
|
Image image = new Image();
|
|
image.Source = picItem.Photo;
|
|
image.Stretch = Stretch.Fill;
|
|
aSlideShowItem.Item = image;
|
|
aSlideShowItem.Description = picItem.Description;
|
|
_slideShow.Items.Add(aSlideShowItem);
|
|
}
|
|
#endif
|
|
}
|
|
|
|
}
|
|
}
|
|
|