新しいカスタムコンストラクターを使用するには、Baseの新しいコンストラクターを作成する必要があります。このような:
public abstract class SampleDataCommon : PrototypeCeA.Common.BindableBase
{
private static Uri _baseUri = new Uri("ms-appx:///");
//Base constructor
public SampleDataCommon(String uniqueId, String title, String subtitle, String imagePath, SolidColorBrush Background)
{
this._uniqueId = uniqueId;
this._title = title;
this._subtitle = subtitle;
this._imagePath = imagePath;
this._background = Background;
}
// new customized constructor
public SampleDataCommon(String uniqueId, String title, String subtitle, bitmapImage image, String description, String Author)
{
this._uniqueId = uniqueId;
this._title = title;
this._subtitle = subtitle;
this._description = description;
this._image = image;
this._author = author;
}
}
そして今、グリッドアイテムを作成するために、この新しいコンストラクターを新しいカスタムクラス(または既存のクラス)に呼び出す必要があります。