_gridView.theme = new IGGridViewLightTheme();
チャート テーマを使用すると、一貫した色の調整されたルック アンド フィールをチャートに適用できます。 IGGridView theme
プロパティを定義済みテーマのうちのいずれかに設定すれば良いだけです。
C# の場合:
_gridView.theme = new IGGridViewLightTheme();
Objective-C の場合:
_gridView.theme = [[IGGridViewLightTheme alloc] init];
以下の表に、サポートされるテーマのタイプに関連付けられた名前とその描画プレビューを記載します。
以下のコードは、新しい IGGridViewThemeDefinition を定義します。 CustomTheme のインスタンスを初期化した後、それを IGGridView コントロールの theme
プロパティに割り当てます。
Objective-C の場合:
@interface CustomTheme : NSObject <IGGridViewThemeDefinition>
@end
@implementation CustomTheme
-(UIColor *)cellBackgroundColor
{
return [UIColor blueColor];
}
-(UIColor *)selectedCellColor
{
return [UIColor redColor];
}
@end
C# の場合:
public class CustomTheme :IGGridViewThemeDefinition
{
public override UIColor CellBackgroundColor
{
get
{
return UIColor.Blue;
}
}
public override UIColor SelectedCellColor
{
get
{
return UIColor.Red;
}
}
}
以下のトピックでは、このトピックに関連する追加情報を提供しています。