gfo*_*org 3 silverlight windows-phone-7
<Button x:Name="BtnSearch" Height="120" Width="120" Margin="-20,-30,0,0" Click="BtnSearch_Click" BorderThickness="0" BorderBrush="{x:Null}" Visibility="Visible" >
<Button.Background>
<ImageBrush x:Name="searchImage" ImageSource="images\appbar.feature.search.rest.png" Stretch="Fill"/>
</Button.Background>
Run Code Online (Sandbox Code Playgroud)
在上面的xaml中,我必须以编程方式将imagesource更改为不同的图像.我该怎么做 ?
使用
searchImage.ImageSource =
new BitmapImage(new Uri(imgPath, UriKind.Relative));
Run Code Online (Sandbox Code Playgroud)
更改与背景图像画笔关联的图像.
归档时间: |
|
查看次数: |
8235 次 |
最近记录: |