Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom detail pages in Windows 8 grid application
    text
    copied!<p>I have created a simple C# Windows 8 grid application. </p> <p>If you're unfamiliar with this layout, there is a brief explanation of it here :</p> <p><a href="http://blogs.msdn.com/b/window_8_avtar/archive/2012/09/24/part-1-create-your-first-window-8-app-using-quot-grid-app-xaml-quot-template-and-c-and-xaml-from-scratch.aspx">Link</a></p> <p>What I would like to have is simple - some custom <code>ItemDetailPages</code>. I'd like to be able to click on some items on the <code>GroupDetailPage</code> and the <code>GroupedItemsPage</code> and navigate to a custom <code>.xaml</code> file, one where I can include more than one image.</p> <p>I'm sure there is a simple way of doing that that I have missed out on, and I'm also sure that this information will be useful for a lot of people, so I will be offering a bounty on this question.</p> <p>I have struggled with doing this so far : </p> <p>I've created a <code>CustomDataItem</code> in the <code>SampleDataSource.cs</code> class :</p> <pre><code> /// &lt;summary&gt; /// Generic item data model. /// &lt;/summary&gt; public class CustomDataItem : SampleDataCommon { public CustomDataItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content, SampleDataGroup group) : base(uniqueId, title, subtitle, imagePath, description) { this._content = content; this._group = group; } private string _content = string.Empty; public string Content { get { return this._content; } set { this.SetProperty(ref this._content, value); } } private SampleDataGroup _group; public SampleDataGroup Group { get { return this._group; } set { this.SetProperty(ref this._group, value); } } } </code></pre> <p>However, obviously, adding to the <code>ObservableCollection</code> </p> <pre><code>private ObservableCollection&lt;SampleDataGroup&gt; _allGroups = new ObservableCollection&lt;SampleDataGroup&gt;(); public ObservableCollection&lt;SampleDataGroup&gt; AllGroups { get { return this._allGroups; } } </code></pre> <p>is impossible with a different data type. So what can I do in this case ?</p> <p>Thanks a lot.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload