tag:blogger.com,1999:blog-8980734269859237005.post7470785564658493011..comments2024-01-30T01:03:21.768-08:00Comments on DevCurry: Setting the Background property of a Button Element in WPF using ImageBrushSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8980734269859237005.post-21079662631728799422009-08-15T16:29:02.550-07:002009-08-15T16:29:02.550-07:00Hi! Why are you using so much code behind and so ...Hi! Why are you using so much code behind and so much effort casting 2 times and creating a useless imagesource? You can do everything using binding in xaml like this:<br /> <ComboBox Width="65" Height="40" x:Name="cmbFlag"><br /> <Image Source="Images/Flag1.jpg"/><br /> <Image Source="Images/Flag2.Orlandohttps://www.blogger.com/profile/15766428625889945414noreply@blogger.com