Backup/MyFriends/3rd Party Libraries/FishEye/FishEyeDemo.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
namespace FishEyeDemo
{
/// <summary>
/// This is taken from the excellent article by Paul Tallett at the following
/// Url http://www.codeproject.com/WPF/Panels.asp
/// </summary>
public class FishEyePanel : Panel
{
enum AnimateState { None, Up, Down };
public FishEyePanel()
{
this.Background = Brushes.Transparent;
this.MouseMove += new MouseEventHandler(FishEyePanel_MouseMove);
this.MouseEnter += new MouseEventHandler(FishEyePanel_MouseEnter);
this.MouseLeave += new MouseEventHandler(FishEyePanel_MouseLeave);
}
public double Magnification
{
get { return (double)GetValue(MagnificationProperty); }
set { SetValue(MagnificationProperty, value); }
}
// Using a DependencyProperty as the backing store for Magnification. This enables animation, styling, binding, etc...
public static readonly DependencyProperty MagnificationProperty =
DependencyProperty.Register("Magnification", typeof(double), typeof(FishEyePanel), new UIPropertyMetadata(2d));
public int AnimationMilliseconds
{
get { return (int)GetValue(AnimationMillisecondsProperty); }
set { SetValue(AnimationMillisecondsProperty, value); }
}
// Using a DependencyProperty as the backing store for AnimationMilliseconds. This enables animation, styling, binding, etc...
public static readonly DependencyProperty AnimationMillisecondsProperty =
DependencyProperty.Register("AnimationMilliseconds", typeof(int), typeof(FishEyePanel), new UIPropertyMetadata(125));
// If set true we scale different sized children to a constant width
public bool ScaleToFit
{
get { return (bool)GetValue(ScaleToFitProperty); }
set { SetValue(ScaleToFitProperty, value); }
}
后面还有 249 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
