image的路径写法格式

if (MapGrid.Visibility == Visibility.Visible)
{
      this.MapGrid.Visibility = Visibility.Collapsed;
     ((Image)this.vis.Content).Source = new BitmapImage(new Uri("\\Image\\down2.png", UriKind.Relative));
}
else
{
this.MapGrid.Visibility = Visibility.Visible;
((Image)this.vis.Content).Source = new BitmapImage(new Uri("\\Image\\up2.png",UriKind.Relative));


}

posted @ 2019-04-30 12:14  岳凯歌  阅读(422)  评论(0编辑  收藏  举报