eXpressAppFrameworkを使用してWindowsアプリケーションを開発しています。クラスの列挙型プロパティに応じて、ルックアップビュープロパティエディタをフィルタリングしたいと思います。
これは私のコードです:
カテゴリクラス:
private TranType tranType;
public TranType TranType
{
get
{
return tranType;
}
set
{
SetPropertyValue("TranType", ref tranType, value);
}
}
private string categoryName;
public string CategoryName
{
get
{
return categoryName;
}
set
{
SetPropertyValue("CategoryName", ref categoryName, value);
}
}
private Category parentCategory;
public Category ParentCategory
{
get
{
return parentCategory;
}
set
{
SetPropertyValue("ParentCategory", ref parentCategory, value);
}
}
トランクラス:
private Category category;
[DataSourceCriteria("TranType == TranType")]
public Category Category
{
get
{
return category;
}
set
{
SetPropertyValue("Category", ref category, value);
}
}
private static TranType myTranType;
[ImmediatePostData]
public TranType MyTranType
{
get
{
return myTranType;
}
set
{
SetPropertyValue("MyTranType", ref myTranType, value);
}
}
それぞれCategory
にがありTranType
、ユーザーがたとえばTranType=Expense
を選択したときに、指定されたに基づいてルックアップでフィルタリングされたカテゴリが必要TranType
です。
助けてくれてありがとう。