예제 #1
0
        private void AddFadeBehavior(View view)
        {
            var behavior = new FadeBehavior();

            view.Behaviors.Add(behavior);
            behavior.SetBinding(FadeBehavior.IsSelectedProperty, "IsSelected");
        }
예제 #2
0
        /// <summary>
        /// 设置淡入淡出
        /// </summary>
        /// <param name="view"></param>
        /// <param name="data"></param>
        private void SetFade(View view, object data)
        {
            var behavior = new FadeBehavior();

            behavior.SetBinding(FadeBehavior.IsSelectedProperty, "IsSelected", BindingMode.TwoWay);
            view.Behaviors.Add(behavior);
        }