本文整理汇总了C#中NSIndexPath类的典型用法代码示例。如果您正苦于以下问题:C# NSIndexPath类的具体用法?C# NSIndexPath怎么用?C# NSIndexPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NSIndexPath类属于命名空间,在下文中一共展示了NSIndexPath类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RowSelected
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
new UIAlertView("Row Selected"
, indexedTableItems[keys[indexPath.Section]][indexPath.Row].Heading
, null, "OK", null).Show();
tableView.DeselectRow (indexPath, true);
}
示例2: Selected
public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
Value = !Value;
InitializeCell(tableView);
base.Selected(dvc, tableView, path);
}
示例3: MoveItem
public override void MoveItem (UICollectionView collectionView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
{
// Reorder our list of items
var item = Numbers [(int)sourceIndexPath.Item];
Numbers.RemoveAt ((int)sourceIndexPath.Item);
Numbers.Insert ((int)destinationIndexPath.Item, item);
}
示例4: Selected
public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
{
var root = (RootElement)Parent.Parent;
root.RadioSelected = RadioIdx;
base.Selected(dvc, tableView, indexPath);
}
示例5: MoveRow
public override void MoveRow (UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
{
var section = Container.Root [sourceIndexPath.Section];
var source = section [sourceIndexPath.Row];
section.Remove (source);
section.Insert (destinationIndexPath.Row, source);
}
示例6: Selected
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
if (IsReadonly) {
base.Selected (dvc, tableView, path);
return;
}
var controller = new UIViewController ();
UITextView disclaimerView = new UITextView (controller.View.Frame);
// disclaimerView.BackgroundColor = UIColor.FromWhiteAlpha (0, 0);
// disclaimerView.TextColor = UIColor.White;
// disclaimerView.TextAlignment = UITextAlignment.Left;
if (!string.IsNullOrWhiteSpace (Value))
disclaimerView.Text = Value;
else
disclaimerView.Text = string.Empty;
disclaimerView.Font = UIFont.SystemFontOfSize (16f);
disclaimerView.Editable = true;
controller.View.AddSubview (disclaimerView);
controller.NavigationItem.Title = Caption;
controller.NavigationItem.RightBarButtonItem = new UIBarButtonItem (string.IsNullOrEmpty (_saveLabel) ? "Save" : _saveLabel, UIBarButtonItemStyle.Done, (object sender, EventArgs e) => {
if (OnSave != null)
OnSave (this, EventArgs.Empty);
controller.NavigationController.PopViewControllerAnimated (true);
Value = disclaimerView.Text;
});
dvc.ActivateController (controller);
}
示例7: GetCell
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell("ArterTableCell");
if(cell == null)
cell = new UIJaktTableViewCell(UITableViewCellStyle.Default, "ArterTableCell");
var groupId = JaktLoggApp.instance.ArtGroupList[indexPath.Section].ID;
var artsInSection = JaktLoggApp.instance.ArtList.Where(a => a.GroupId == groupId);
var c = artsInSection.Count();
//legg til art - knapp
if(_controller.TableView.Editing && groupId == 100 && indexPath.Row == c){
cell.TextLabel.Text = Utils.Translate("specie.new");
//cell.Accessory = UITableViewCellAccessory.None;
cell.ImageView.Image = null;
}
else
{
var art = artsInSection.ElementAt(indexPath.Row);
var label = art.Navn;
var icon = JaktLoggApp.instance.SelectedArtIds.Contains(art.ID) ? "icon_checked.png" : "icon_unchecked.png";
var file = "Images/Icons/"+icon;
cell.ImageView.Image = new UIImage(file);
cell.ImageView.Layer.MasksToBounds = true;
cell.ImageView.Layer.CornerRadius = 5.0f;
cell.TextLabel.Text = label;
cell.TextLabel.TextAlignment = UITextAlignment.Left;
if(!EditMode)
cell.Accessory = UITableViewCellAccessory.DetailDisclosureButton;
}
return cell;
}
示例8: GetItemAt
protected override object GetItemAt(NSIndexPath indexPath)
{
if (ItemsSource == null)
return null;
return ItemsSource.ElementAt(indexPath.Row);
}
示例9: GetCell
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
var cell = TableView.DequeueReusableCell (new NSString ("cell"), indexPath);
CKRecord record = records[indexPath.Row];
cell.TextLabel.Text = (NSString)record["name"];
return cell;
}
示例10: GetCell
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell(cellIdentifier) as MonkeyCell ?? new MonkeyCell(cellIdentifier);
//cell.Image = new UIImage(monkeys[indexPath.Row].Image);
cell.Name = monkeys[indexPath.Row].Name;
return cell;
}
示例11: GetCell
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell(cellIdentifier) as TransferViewCell;
cell.SetData(_mainViewModel.Shl[indexPath.Row]);
return cell;
}
示例12: GetHeightForRow
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
{
// In here you could customize how you want to get the height for row. Then
// just return it.
return 60;
}
示例13: GetHeightForRow
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
{
switch (indexPath.Section)
{
case 0:
{
switch (indexPath.Row)
{
case 1: // hemisphere picker
if (_editingHemisphere)
{
return 119;
}
else
{
return 0;
}
case 3: // speed picker
if (_editingSpeed)
{
return 119;
}
else
{
return 0;
}
}
}
break;
}
return base.GetHeightForRow(tableView, indexPath);
}
示例14: GetCell
/// <summary>
/// Gets the actual UITableViewCell to render for the particular section and row
/// </summary>
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
//---- declare vars
UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
TableItem item = indexedTableItems[keys[indexPath.Section]][indexPath.Row];
if (cell == null)
{
// use a Subtitle cell style here
cell = new UITableViewCell (UITableViewCellStyle.Subtitle, cellIdentifier);
}
//---- set the item text, subtitle and image/icon
cell.TextLabel.Text = item.Heading;
cell.DetailTextLabel.Text = item.Album;
cell.ImageView.Image = UIImage.FromFile("Images/" + item.ImageName);
// if the item is marked as a favorite, use the CheckMark cell accessory
// otherwise (i.e. when false) use the disclosure cell accessory
if (item.Singing) {
cell.Accessory = UITableViewCellAccessory.Checkmark;
} else {
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
return cell;
}
示例15: RowSelected
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
tableView.DeselectRow(indexPath, true);
if (RowSelectedAction != null) {
RowSelectedAction(tableView, indexPath);
}
}