첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

▶ XAML

<Grid xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <dxg:GridControl x:Name="gridControl"
        AutoPopulateColumns="True">
        <dxg:GridControl.View>
            <dxg:TableView x:Name="tableView"
                AllowPerPixelScrolling="True"
                ScrollAnimationMode="Custom"
                CustomScrollAnimation="tableView_CustomScrollAnimation" />
        </dxg:GridControl.View>
    </dxg:GridControl>
</Grid>

 

728x90

 

▶ C#

using System;
using System.Windows.Media.Animation;

using DevExpress.Xpf.Grid;

#region 테이블 뷰 커스텀 스크롤 애니메이션 처리하기 - tableView_CustomScrollAnimation(sender, e)

/// <summary>
/// 테이블 뷰 커스텀 스크롤 애니메이션 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void tableView_CustomScrollAnimation(object sender, CustomScrollAnimationEventArgs e)
{
    e.Storyboard = new Storyboard();

    DoubleAnimation doubleAnimation = new DoubleAnimation();

    doubleAnimation.Duration       = new Duration(TimeSpan.FromMilliseconds(200));
    doubleAnimation.From           = e.OldOffset;
    doubleAnimation.To             = e.NewOffset;
    doubleAnimation.EasingFunction = new ExponentialEase() { Exponent = 0 };

    e.Storyboard.Children.Add(doubleAnimation);
}

#endregion

 

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요