我希望将路径作为WPF图像的字符串,并将其作为Bitmap的参数。我需要字符串中的路径。 我有可变图像的WPF图像 我有
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete && self.routineToEdit.stretches.count > 2) {
// this needs to be added to keep an consistency error from being thrown
// you'll also need to end updates when it's done deleting
[self.tableView beginUpdates];
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
// pbasdf suggested this for handling the NSOrderedSet
NSMutableOrderedSet *tempSet = self.myNSManagedObject.myNSOrderedSet.mutableCopy;
[tempSet removeObjectAtIndex:indexPath.row];
self.myNSManagedObject.myNSOrderedSet = tempSet;
[self.tableView endUpdates];
// and you need to save the context so the deletion persists
[self saveContext];
} else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
答案 0 :(得分:0)
在XAML中显式创建一个BitmapImage:
var bitmapImage = (BitmapImage)image.Source;
var uriSource = bitmapImage.UriSource;
现在,您可以使用以下代码访问BitmapImage的Source属性:
select s.col1,
coalesce(max(col2) over (partition by col1), -1) as col2
from source s;
答案 1 :(得分:0)