|
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Media3D;
namespace OpenSource.Wpf3D
{
public class ModelUIElement3D : UIElement3D
{
// The Model property for the sphere
private static readonly DependencyProperty ModelProperty =
DependencyProperty.Register("Model",
typeof(Model3D),
typeof(ModelUIElement3D),
new PropertyMetadata(ModelPropertyChanged));
private static void ModelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ModelUIElement3D s = (ModelUIElement3D)d;
s.Visual3DModel = s.Model;
}
public Model3D Model
{
get
{
return (Model3D)GetValue(ModelProperty);
}
set
{
SetValue(ModelProperty, value);
}
}
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.