I have a class named Animations and a resource dictionary named animationResources.xaml on the same directory:

the way I am able to find a resource in that dictionary is by creating a resource dictionary with code providing the path of animationResources.xaml:
ResourceDictionary dict = new ResourceDictionary();
Uri uri = new Uri("/FilesPro2.1;component/Classes/Storyboards/animationResources.xaml", UriKind.Relative);
dict.Source = uri;
Application.Current.Resources.MergedDictionaries.Add(dict);
I am planing to export this project so the actual project name will be different and the path of the resource dictionary will also change. The only thing that I know is that the class and the resource dictionary will be located on the same directory in this case it is the directory Storyboards (look at the first image) So in order to build the Uri I guess I need to somehow get the path of the class and also get the name of the project. If I get those two strings I will probably be able to build the uri. How can I get the name of the project programaticaly (FilesPro2.1) and the path of Animations.cs (“C:\Users……..\FilesPro2.1\classes\storyboards\animations.cs”) also the names of the classes will be the same and also the name of the resource dictionary will be the same.
EDIT
I will try to explain my self a little better sorry. Ok so perhaps disregard the title question. I am building several projects and all of them have similar animations. as a result I want to create the storyboards with code. when I do that it is hard to set the easing functions with c# therefore what I have done is to create the easing functions with xaml where it is easier and create a basic animation with c# which it is also essay. when creating this animations on a separate class I am able to find the resource from the resource dictionary if I merge the dictionaries. But in order for me to merge the dictionaries I need to know the path. since I am planing to export this class and resource dictionary to several projects it will be nice if I don’t have to know the path or I don’t have to merge the dictionary in the app.xaml file for every project. My goal was to import the animationResources.xaml and Animation.cs to every project and then expect the class in (Antimation.cs) to find a resource from animationResources.xaml. I don’t know if that is possible the only things that I know is that when exporting animationResources.xaml and Antimation.cs they will have the same names and they will be located in the same directory. that’s why I thought that if it was possible to find the path of Antimation.cs I where going to be able to build the string of the path in order to merge the dictionary regarled off the name of the project etc..
I too am relatively new to WPF. You said in your question “the way I am able to find a resource…” Are you also aware that you can find a resource just by using XAML? In you App.xaml file you can add an Application Resources as shown below:
Then you can just use those resources with {StaticResource resourceName}. I would have added this as a comment to your question but I’ve never figured out how to format code in a comment and it’s very hard to read otherwise.