「Xamarin.MacのNSTableViewでNSTableViewSourceを使う」の版間の差分
imported>Administrator 細 Administrator がページ「Xamarin.Mac/NSTableViewでNSTableViewSourceを使う」を「Xamarin.MacのNSTableViewでNSTableViewSourceを使う」に移動しました |
|||
| (他の1人の利用者による、間の1版が非表示) | |||
| 45行目: | 45行目: | ||
switch (tableColumn.Identifier) | switch (tableColumn.Identifier) | ||
{ | { | ||
// CellベースではNSStringを返せばよかったが、ViewベースではNSView派生クラスを返さねばならない。 | |||
// NSTableCellViewを返すとCellベースと同じような使用感となる。 | |||
// カスタムセルを使用する場合は分岐するとよい。 | |||
default: | default: | ||
var cellView = (NSTableCellView)tableView.MakeView(tableColumn.Identifier, this); | var cellView = (NSTableCellView)tableView.MakeView(tableColumn.Identifier, this); | ||
| 53行目: | 57行目: | ||
} | } | ||
</source> | </source> | ||
あとはCellベースと同じ。 | |||
== 実装1:Cell Base == | == 実装1:Cell Base == | ||