WPF 图片路径

来源:互联网 发布:39健康软件 编辑:程序博客网 时间:2024/06/05 07:02
打开,保存路径
            string fileName;            OpenFileDialog ofd = new OpenFileDialog();            ofd.Filter = "图片(*.png;*.jpg,*.gif)|*.png;*.jpg,*.gif";            if (ofd.ShowDialog() == true)            {                fileName = ofd.FileName;            }            else            {                return;            }


            BitmapImage image = new BitmapImage(new Uri("E:/素材/百度/qw_cat_0007.gif", UriKind.Absolute));            imgLight.Source = image;

原创粉丝点击