Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a grid populated by objects of different types in WPF (including flash .swf objects)
    primarykey
    data
    text
    <p>I am trying to create a WPF application in C# that is comprised of a grid with 8 cells, one for each object to be displayed to the user. This grid is part of a storyboard that will allow the user to flick through one grid to the next grid, which would be populated by another set of 8 objects. The problem is that this grid will be populated by objects from a folder on the user's computer and there is no way of knowing the exact type of object that will be loaded. Instead, the object will be: an image, .swf video, PDF, or Word document. </p> <p>I have two questions: 1. How can I handle the binding of an object of unknown type in the grid at runtime in both the XAML and source code? 2. How can I handle the binding for a flash object to this cell?</p> <p>If the objects were all the same type (just images), it wouldn't be so bad, but since it's not possible to know what each cell could contain until the program is run, I am not sure how to proceed. </p> <p>I have examined several sites that suggest methods of embedding flash in a C# WPF application, but that's only when it is known that a flash object will be loaded: <a href="http://hintdesk.com/c-wpf-play-swf-in-wpf-application/" rel="nofollow">http://hintdesk.com/c-wpf-play-swf-in-wpf-application/</a>.</p> <p>I also thought of loading objects of the Object class as a way of avoiding the issuing of hard coding an object type <a href="http://social.msdn.microsoft.com/Forums/en/wpf/thread/ca76fc35-950c-4fac-bb30-534cb7ad1b5d" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/wpf/thread/ca76fc35-950c-4fac-bb30-534cb7ad1b5d</a>, but apparently that's not possible since you wouldn't be able to access the properties. </p> <p>Any help would be appreciated! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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