This is a migrated thread and some comments may be shown as answers.

Building WPF Pixel Shader Effect Library with TelerikProvider support

1 Answer 220 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Paw
Top achievements
Rank 1
Paw asked on 01 Nov 2010, 09:22 AM
Hi,

I really like your transition control and want to extend it with futher transitions effect. Thus I am trying to adjust the WPF Pixel Shader Effect Library found at:

http://wpffx.codeplex.com/

The easiest way would be if you alrady had a binary version with support for Telerik (TransitionProvider). But I havn't managed to find such. Do you know of such?

First, let me say, that I have been able to follow the guide for custom transitions in your online manual, but there are quite a few transitions available so it would be convinient to just adjust the code of the project found at CodePlex (to support telerik transition model). But maybe it isn't posible. Let me try to explain what I have done, and which error I get when using the adjusted library. 

 

As a proof of concept I have tried to adjust the CircleRevealTransitionsEffect to support telerik doing as follows:

Changed the "CircleRevealTransitionEffect" to inherit from BaseTransitionEffect (I assume that this might be the problem)

public class CircleRevealTransitionEffect :  Telerik.Windows.Controls.TransitionEffects.BaseTransitionEffect

And the added a new class "CircleRevealTransitionProvider"

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls.TransitionControl;
using System.Windows.Media.Effects;
  
namespace TransitionEffects.TelerikProviders
{
    public class CircleRevealTransitionProvider : TransitionProvider
    {
        protected override ShaderEffect CreateTransitionEffect()
        {
            CircleRevealTransitionEffect effect = new CircleRevealTransitionEffect();
            return effect;
        }
    }
}

 

 

 

 

 

 

Everything compiles nicely but using the transition gives an runtime error: "transitioncontrol/transitioneffects/effects/circlerevealtransitioneffect.ps". Do you have a clue to what can be the problem.

I know that my question will force you to install WPF Shader Effect library yourself, but if this is a problem I will try minimize the size of the library and attach my own version here. But I guess it is more simple for you to download the complete source from CodePlex. Remeber to install the "Shader Effect Build Task and Effects" to be able to compile it all. It's works smoothly.

http://wpf.codeplex.com/releases/view/14962#DownloadId=40167

Looking forward to hear from you.

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 03 Nov 2010, 04:33 PM
Hello Paw,

 In my opinion the problem is that the .ps file is not where the ShaderEffect class expects it to be. In the BaseTransitionEffect class we assume that the .ps files are in the Telerik.Windows.Controls assembly in the folder of the TransitionControl. If you want to change this you need to override the LoadShader virtual method of the BaseTransitionEffect class.

Hope this helps!

Greetings,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TransitionControl
Asked by
Paw
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or