Hi,
this is my View
<Image Height="275" HorizontalAlignment="Left" Margin="26,12,0,0"
Name="image1" Stretch="Fill" VerticalAlignment="Top" Source="{Binding LatestImage,Mode=TwoWay,NotifyOnTargetUpdated=True}" Width="454" />
<Button Content="Button" Height="40" HorizontalAlignment="Left"
Margin="66,312,0,0" Name="button1" VerticalAlignment="Top" Width="182" Command="{Binding StartCameraCommand}" />
ViewModel:
private RelayCommand startCameraCommand;
public MainWindowViewModel()
{
StartCamera();
}
public ICommand StartCameraCommand
{
get
{
return startCameraCommand ?? (startCameraCommand = new RelayCommand(param => StartCamera()));
}
}
private ImageSource latestImage;
public ImageSource LatestImage
{
get
{
return latestImage;
}
set
{
latestImage = value;
NotifyPropertyChanged("LatestImage");
}
}
I am assigning value to latestimage but it is not updating to the view.I can't able to see the image on the view.
Please suggest me some sample regarding this problem as it is very urgent i dont know wat went wrong.
But when I am assigning value in constructor it is working fine,but after clicking the button it is updating the UI