Click here to Skip to main content
15,912,977 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to display canvas thumbnails. Pin
Nekkantidivya8-Jun-09 21:23
Nekkantidivya8-Jun-09 21:23 
AnswerRe: How to display canvas thumbnails. Pin
Pete O'Hanlon8-Jun-09 23:08
mvePete O'Hanlon8-Jun-09 23:08 
QuestionProblem in showing an image in WPF Pin
paradisonoir8-Jun-09 14:18
paradisonoir8-Jun-09 14:18 
AnswerRe: Problem in showing an image in WPF Pin
Mark Salsbery8-Jun-09 14:49
Mark Salsbery8-Jun-09 14:49 
GeneralRe: Problem in showing an image in WPF Pin
#realJSOP8-Jun-09 23:36
professional#realJSOP8-Jun-09 23:36 
GeneralRe: Problem in showing an image in WPF Pin
Mark Salsbery9-Jun-09 5:43
Mark Salsbery9-Jun-09 5:43 
GeneralRe: Problem in showing an image in WPF Pin
#realJSOP9-Jun-09 9:01
professional#realJSOP9-Jun-09 9:01 
AnswerRe: Problem in showing an image in WPF Pin
Christian Graus8-Jun-09 16:13
protectorChristian Graus8-Jun-09 16:13 
JokeRe: Problem in showing an image in WPF Pin
Mark Salsbery9-Jun-09 5:43
Mark Salsbery9-Jun-09 5:43 
GeneralRe: Problem in showing an image in WPF Pin
Christian Graus9-Jun-09 10:53
protectorChristian Graus9-Jun-09 10:53 
QuestionUsing Drawing Brushes in WPF 3D Pin
David Shapira8-Jun-09 10:16
David Shapira8-Jun-09 10:16 
QuestionmsOffice intergration Pin
Ed Hill _5_8-Jun-09 3:25
Ed Hill _5_8-Jun-09 3:25 
AnswerRe: msOffice intergration Pin
Mark Salsbery8-Jun-09 6:59
Mark Salsbery8-Jun-09 6:59 
GeneralRe: msOffice intergration Pin
Ed Hill _5_9-Jun-09 3:19
Ed Hill _5_9-Jun-09 3:19 
GeneralRe: msOffice intergration Pin
Mark Salsbery9-Jun-09 5:57
Mark Salsbery9-Jun-09 5:57 
AnswerRe: msOffice intergration Pin
Mike Marynowski15-Jun-09 23:01
professionalMike Marynowski15-Jun-09 23:01 
QuestionBinding database values to a ComboBox more difficult in WPF Pin
Etienne_1238-Jun-09 2:07
Etienne_1238-Jun-09 2:07 
AnswerRe: Binding database values to a ComboBox more difficult in WPF Pin
Pete O'Hanlon8-Jun-09 5:02
mvePete O'Hanlon8-Jun-09 5:02 
GeneralRe: Binding database values to a ComboBox more difficult in WPF Pin
Etienne_1238-Jun-09 6:11
Etienne_1238-Jun-09 6:11 
QuestionHow to bind data to a listview in WPF Pin
Nekkantidivya7-Jun-09 18:32
Nekkantidivya7-Jun-09 18:32 
AnswerRe: How to bind data to a listview in WPF Pin
Mark Salsbery7-Jun-09 20:47
Mark Salsbery7-Jun-09 20:47 
QuestionMedia Elements usage based on some index value that matches with media element name Pin
pavanip5-Jun-09 21:45
pavanip5-Jun-09 21:45 
AnswerRe: Media Elements usage based on some index value that matches with media element name Pin
Mark Salsbery6-Jun-09 8:33
Mark Salsbery6-Jun-09 8:33 
GeneralRe: Media Elements usage based on some index value that matches with media element name Pin
pavanip6-Jun-09 19:33
pavanip6-Jun-09 19:33 
GeneralRe: Media Elements usage based on some index value that matches with media element name Pin
Mark Salsbery7-Jun-09 6:29
Mark Salsbery7-Jun-09 6:29 
Here's two examples, using two different types of collections...

Using a Dictionary<>
using System;
using System.Collections.Generic;
using System.Windows.Controls;

    // Make a dictionary of MediaElements
    Dictionary<int, MediaElement> mediaElementDictionary = new Dictionary<int, MediaElement>();

    // Add MediaElements to the dictionary
    mediaElementDictionary.Add(1, mp1);
    mediaElementDictionary.Add(2, mp2);
    ...

    // Access MediaElements in the dictionary
    int i = 1;
    MediaElement mediaelement;
    if (mediaElementDictionary.TryGetValue(i, out mediaelement))
    {
        // use mediaelement
    }

Using a List<>
using System;
using System.Collections.Generic;
using System.Windows.Controls;

    // Make a list of MediaElements
    List<MediaElement> mediaElementList = new List<MediaElement>();

    // Add MediaElements to the list
    mediaElementList.Add(mp1);
    mediaElementList.Add(mp2);
    ...

    // Access MediaElements in the list
    int i = 1;
    // Note: i is 1 to 20, indexes are zero-based so we have to subtract 1
    MediaElement mediaelement = mediaElementList[i - 1];
    // use mediaelement


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.