packages/MaterialDesignThemes.2.5.1/src/net45/Transitions/Transitioner.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
namespace MaterialDesignThemes.Wpf.Transitions
{
/// <summary>
/// The transitioner provides an easy way to move between content with a default in-place circular transition.
/// </summary>
public class Transitioner : Selector, IZIndexController
{
private Point? _nextTransitionOrigin;
static Transitioner()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Transitioner), new FrameworkPropertyMetadata(typeof(Transitioner)));
}
/// <summary>
/// Causes the the next slide to be displayed (affectively increments <see cref="Selector.SelectedIndex"/>).
/// </summary>
public static RoutedCommand MoveNextCommand = new RoutedCommand();
/// <summary>
/// Causes the the previous slide to be displayed (affectively decrements <see cref="Selector.SelectedIndex"/>).
/// </summary>
public static RoutedCommand MovePreviousCommand = new RoutedCommand();
/// <summary>
/// Moves to the first slide.
/// </summary>
public static RoutedCommand MoveFirstCommand = new RoutedCommand();
/// <summary>
/// Moves to the last slide.
/// </summary>
public static RoutedCommand MoveLastCommand = new RoutedCommand();
public static readonly DependencyProperty AutoApplyTransitionOriginsProperty = DependencyProperty.Register(
"AutoApplyTransitionOrigins", typeof(bool), typeof(Transitioner), new PropertyMetadata(default(bool)));
/// <summary>
/// If enabled, transition origins will be applied to wipes, according to where a transition was triggered from. For example, the mouse point where a user clicks a button.
/// </summary>
public bool AutoApplyTransitionOrigins
{
get => (bool)GetValue(AutoApplyTransitionOriginsProperty);
set => SetValue(AutoApplyTransitionOriginsProperty, value);
}
public static readonly DependencyProperty DefaultTransitionOriginProperty = DependencyProperty.Register(
"DefaultTransitionOrigin", typeof(Point), typeof(Transitioner), new PropertyMetadata(new Point(0.5, 0.5)));
public Point DefaultTransitionOrigin
{
get => (Point)GetValue(DefaultTransitionOriginProperty);
set => SetValue(DefaultTransitionOriginProperty, value);
后面还有 200 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。