|
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Xml;
namespace WpfDiscipleBlogViewer3D
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
Panel3D _panel3D;
readonly TimeSpan ANIMATION_LENGTH = TimeSpan.FromSeconds(.7);
public Window1()
{
InitializeComponent();
}
void OnPanel3DLoaded(object sender, RoutedEventArgs e)
{
// Grab a reference to the Panel3D when it loads.
_panel3D = sender as Panel3D;
}
void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
void Open_Executed(object sender, ExecutedRoutedEventArgs e)
{
string url = (e.Parameter as XmlAttribute).Value;
Process.Start(url);
}
void MoveForwardButtonClicked(object sender, RoutedEventArgs e)
{
_panel3D.MoveItems(1, true, ANIMATION_LENGTH);
}
void MoveBackButtonClicked(object sender, RoutedEventArgs e)
{
_panel3D.MoveItems(1, false, ANIMATION_LENGTH);
}
void PageForwardButtonClicked(object sender, RoutedEventArgs e)
{
_panel3D.MoveItems(3, true, ANIMATION_LENGTH);
}
void PageBackButtonClicked(object sender, RoutedEventArgs e)
{
_panel3D.MoveItems(3, false, ANIMATION_LENGTH);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.