Set a button's background is not as simple as android's dev.it's more complex;
in .xaml file:
<Button Click="Button_Click" x:Name="img_btn">
<Button.Template>
<ControlTemplate>
<!--set button background that we can hanle click event-->
<Image HorizontalAlignment="Left" Margin="0,-69,0,479" x:Name="image1" Stretch="Fill" Width="480" Source="/myNameSpace;component/home_003.jpg" />
</ControlTemplate>
</Button.Template>
</Button>
in this .cs file:
JsonObject jsonObject = (JsonObject)JsonObject.Load(e.Result);
ads_address = jsonObject["imageurl"];//get a url from jsonobject
ImageBrush imageBrush = new ImageBrush();
imageBrush.ImageSource = new BitmapImage(new Uri(ads_address));//ads url likes //"http://27.98.194.93/forum/images/2009/home_004.jpg";
this.img_btn.Background = imageBrush;//this code is not work,perhaps, I can't get what I want(Image) with code "this.img_btn.Background"
how can I get this Image in Button.If can't what's the way to set a button background with a url in code;