PowerShell MetroWindow Image

18 Views Asked by At

Hi i atually create a gui apps WPF with mahapps metro and when i try to put a general background for my gui apps that not working and i need to put the entire path :

Not WORK ( i use Pack URI for other file and that work) :

<Controls:MetroWindow.Background> <ImageBrush ImageSource="pack://application:,,,/Resources/test.png" Stretch="UniformTofill"/></Controls:MetroWindow.Background>

Not WORK :

<Controls:MetroWindow.Background> <ImageBrush ImageSource="Resources/test.png"/> </Controls:MetroWindow.Background>

WORK :

<Controls:MetroWindow.Background> <ImageBrush ImageSource="C:\Users\Administrator\AppData\Local\Projet\Resources\test.png" Stretch="UniformTofill"/> </Controls:MetroWindow.Background>

Try to put without put all the path

0

There are 0 best solutions below