单击时如何放大照片(将图像列表发送到新页面) [英] How to enlarge photo when clicked (send list of images to new page)

查看:57
本文介绍了单击时如何放大照片(将图像列表发送到新页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何发送我的Observable图像集合:

 ObservableCollection< object> items {get;设置;} 

到新页面并将它们加载到列表框中?


我一直得到一个Application_UnhandledException

"参数不正确"


我想基本上创建一个照片查看器(就像内置的照片应用程序一样)


当用户点击缩略图时,它应导航到新页面并加载该图像列表

这适用于WP7



解决方案

 

public partial class App:Application
{
//跨页共享
public static ObservableCollection< object> itemsToShare {get;组; }

...在其他页面中使用:

App.itemsToShare

一种常见的技巧是在app.xaml.cs中创建一个app变量,并在你想要共享数据的页面中使用它。 如果您想以这种方式组织代码,也可以创建一个单独的类来保存要共享的数据。




How do i send my Observable collection of images:

ObservableCollection<object> items {get; set;}

to a new page and load them into the listbox there?

I keep getting an Application_UnhandledException
"Parameter is Incorrect"

I want to basically create a photo viewer (like the builtin Photos App has)

When the user clicks a thumbnail, it should navigate to a new page and load that list of images
This is for WP7

解决方案

public partial class App : Application { // Shared across pages public static ObservableCollection<object> itemsToShare { get; set; }

... Use in other pages:

App.itemsToShare

A common technique is to create an app variable in app.xaml.cs and use that in the pages that you want to share data.  You could also create a separate class to hold data to share if you want to organize your code that way.


这篇关于单击时如何放大照片(将图像列表发送到新页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆