|
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.Configuration;
using System.Windows.Media;
using System.Windows.Media.Media3D;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Reflection;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using System.IO;
using DemoDev;
namespace XamlUserControl
{
/// <summary>
/// Interaction logic for UserControl1.xaml
/// </summary>
public partial class UserControl1 : System.Windows.Controls.UserControl
{
public UserControl1()
{
InitializeComponent();
}
private void OnLoaded(object sender, EventArgs e)
{
// setup trackball for moving the model around
_trackball = new Trackball();
_trackball.Attach(this);
_trackball.Slaves.Add(myViewport3D);
_trackball.Enabled = true;
}
#region Events
private void OnImage1Animate(object sender, RoutedEventArgs e)
{
Storyboard s;
s = (Storyboard)this.FindResource("RotateStoryboard");
this.BeginStoryboard(s);
}
#endregion
#region Globals
Trackball _trackball;
#endregion
}
}
|
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.
James is a program writer for a respectable software company. He is also a Microsoft MVP.