In WPF XAML how can I concatenate 2 constants so I can use pre-define paths?

Posted by toaster24 on Stack Overflow See other posts from Stack Overflow or by toaster24
Published on 2010-03-13T14:12:57Z Indexed on 2010/03/13 14:15 UTC
Read the original article Hit count: 190

Filed under:
|
|

I'm new to XAML, so presume I'm missing something simple. I want to replace the path part of the source path with a c# constant for easier path management, for example I have:

<Image Source="/Images/Themes/Buttons/MyPicture.png" />

and in another class I have my constant defined:

public static readonly string UriImagesButtons = "/Images/Big/PNG/";

I want to have something along the lines of:

<Image Source="{static:UriImagesButtons + MyPicture.png}" />

This means that I can change the path globally at a stroke if the need arises. What's the syntax to do this?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml