csharp wpf image source from resource programmatically

Code Example - csharp wpf image source from resource programmatically

                
                        BitmapImage image = new BitmapImage(new Uri("/MyProject;component/Images/down.png", UriKind.Relative));