Issue
PagesCollection.ViewModel.PagePictureCommands.cs
namespace PagesCollection.ViewModel
{
public partial class PagePicturesViewModel : IPropertieCommands
{
private ICommand deleteAlbum;
public ICommand _CreateAlbum
{
get
{
if (createAlbum == null)
createAlbum = new Model.DelegateCommand(CreateAlbum, CanAdd);
return createAlbum;
}
}
}
}
PagesCollection.ViewModel.PagePicturesViewModel.cs
namespace PagesCollection.ViewModel
{
public partial class PagePicturesViewModel : IPictureMethods
{
public void CreateAlbum(object param)
{...}
}
}
I have one 2 interfaces and one class which divided on 2.Each one half of class has implemented some of those interfaces.But I have a very strange error. ('PagesCollection.ViewModel.PagePicturesViewModel' does not implement interface member 'PagesCollection.Model.IPropertieCommands._CreateAlbum.set') Can u help me please?
Solution
What is it you don't understand, because the error message seems pretty descriptive:
PagesCollection.ViewModel.PagePicturesViewModel' does not implement interface member 'PagesCollection.Model.IPropertieCommands._CreateAlbum.set
I suspect that the interface looks like:
public interface IPropertieCommands
{
ICommand _CreateAlbum { get; set; }
}
Which defines that you must have a setter on that property!
So just add a setter in your implementation:
public ICommand _CreateAlbum
{
get
{
if (createAlbum == null)
createAlbum = new Model.DelegateCommand(CreateAlbum, CanAdd);
return createAlbum;
}
set
{
createdAlbum = value; // or something else sensible!
}
}
Answered By - Jamiec Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.