Code:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" Loaded="UserControl_Loaded">
CanUserAddRows="True"
CanUserDeleteRows="True"
CanUserSortColumns="True"
CanUserReorderColumns="True">
Code:
private void btnUpload_Click(object sender, RoutedEventArgs e)
{
var id1 = (DataRowView)dgvreg.SelectedItem;
string upload = Convert.ToString(id1.Row["upload_your_picture"].ToString());
ImageClass imgs = new ImageClass();
Context DB = new Context();
OpenFileDialog OpenFileObj = new OpenFileDialog();
OpenFileObj.ShowDialog();
upload= OpenFileObj.FileName;
ImageSource imgsource = new BitmapImage(new Uri(upload));
}
Replies
Know the answer? Post it — somebody with the same question will find it here.