|
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Media;
namespace RZWScreenSaver.UI {
/// <summary>
/// Interaction logic for Postcard.xaml
/// </summary>
[ContentProperty("Source")]
public partial class Postcard{
const int NormalShadowAngle = 315;
public Postcard() {
InitializeComponent();
}
public Size Size{
get { return new Size(picture.Width, picture.Height); }
set{
picture.Width = value.Width;
#if DEBUG
if (Math.Abs(picture.Height - value.Height) > 0.001){
Debug.WriteLine("Height mismatch: " + picture.Height + " and " + value.Height);
}
#endif
}
}
public double Angle{
get { return cardRotator.Angle; }
set{
cardRotator.Angle = value;
shadow.Direction = NormalShadowAngle + value;
}
}
public ImageSource Source{
get { return picture.Source; }
set { picture.Source = 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.