Specifying Location Of Images For Ribbon (Relative Path)

Specifying Location Of Images For Ribbon (Relative Path)

Anonymous
Not applicable
696 Views
1 Reply
Message 1 of 2

Specifying Location Of Images For Ribbon (Relative Path)

Anonymous
Not applicable

I'm trying to specify the image source for ribbon images using relative syntax but having no luck.

 

If I use this:

 

button.LargeImage = new BitmapImage(new Uri(@"c:\\folderA\\folderB\\image.png") );

 

it works just fine. But it relies on absolute syntax, which is daft since it forces the code to be installed in a specific directory (or the images).

 

I've tried

 

button.LargeImage = new BitmapImage(new Uri(@"images\\image.png", UriKind.Relative) );

and

 

button.LargeImage = new BitmapImage(new Uri(@"images/image.png", UriKind.Relative) );

 

and I've tried placing the images subdirectory with the png file relative to the assembly, to the project source folder and even relative to AutoCAD itself - and in none of the cases do I get an image.

 

Can anyone shed any light on this for me? I'd like the images subfolder to be relative to the compiled assembly.

 

0 Likes
697 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

here a sample of my code for create my name of file containing the data of my prog :

 

Dim objAssemblyInfo As ApplicationServices.AssemblyInfo = My.Application.Info

My.Settings.GlobalFichierConfig = objAssemblyInfo.DirectoryPath & "\" & _
objAssemblyInfo.Title + ".cfg"

 with the objAssemblyInfo you retrieve info of your Dll.

 

 

0 Likes