Click here to Skip to main content
15,891,704 members
Home / Discussions / WPF
   

WPF

 
QuestionAssign Datagrid Value From Child Web Page To A Textbox In Parent Webform by silverlight Pin
ya_yayeeh21-Oct-10 22:44
ya_yayeeh21-Oct-10 22:44 
QuestionRowDetailsTemplate - Can't Edit Data [modified] Pin
eddieangel21-Oct-10 14:27
eddieangel21-Oct-10 14:27 
QuestionGridView displaying 2 columns with custom controls Pin
Gareth H20-Oct-10 3:03
Gareth H20-Oct-10 3:03 
AnswerRe: GridView displaying 2 columns with custom controls Pin
Gareth H20-Oct-10 23:08
Gareth H20-Oct-10 23:08 
AnswerRe: GridView displaying 2 columns with custom controls Pin
Gareth H21-Oct-10 6:12
Gareth H21-Oct-10 6:12 
QuestionHow to check if i'm in run-time or design time ? Pin
Yanshof20-Oct-10 3:03
Yanshof20-Oct-10 3:03 
AnswerRe: How to check if i'm in run-time or design time ? Pin
Gareth H20-Oct-10 3:53
Gareth H20-Oct-10 3:53 
QuestionHow to create a listview with multiple datatemplates Pin
Member 324168819-Oct-10 10:30
Member 324168819-Oct-10 10:30 
hello,

I'm buzzy to create a custom listview witch has custom defined views based on the data it gets. I like
views with links such described in the example below and for example with a textbox and a textblock,
but it doesn't matter how it goes about it's idea.

I have a enum like this to know witch datatemplate must be used:
    public enum tabType
{
    tabbedTextBlock = 1,
    tabbedLinkedBlock = 2
}


This class is a class to store data in
public class person
{
    private string firstName;
    private string lastName;
    private int age;
    private tabType type;


    public person()
    {
        // Insert code required on object creation below this point.
    }

    public person(string firstName, string lastName, int age, tabType type)
    {
        this.FirstName = firstName;
        this.LastName = lastName;
        this.Age = age;
        this.tabType = type;
    }

    public string FirstName
    {
        get;
        set;
    }

    public string LastName
    {
        get;
        set;
    }

    public int Age
    {
        get;
        set;
    }

            public tabType tabType
            {
                    get;
                    set;
    }

a list of objects too be bind to the list
    public class sampledata : ObservableCollection<person>
{
    public sampledata() :base()
    {
        Add(new person("foo", "fofoo", 23, tabType.tabbedLinkedBlock));
        Add(new person("apple", "fruit", 21, tabType.tabbedTextBlock));
        Add(new person("pineapple", "fruit", 17, tabType.tabbedLinkedBlock));
        Add(new person("banan", "fruit", 47, tabType.tabbedLinkedBlock));
        Add(new person("kiwi", "fruit", 34, tabType.tabbedTextBlock));
    }
}



the tabtype is used to let the custom listview class know witch type of datatemplate most be used.

I have searched for a view day's but couldn't found a nice working solution, only an idea but
it's written in VB.net with windows forms. It can be found here.


thx,
DJohn
QuestionHow to change image\parameters on style definition ? Pin
Yanshof18-Oct-10 21:52
Yanshof18-Oct-10 21:52 
AnswerRe: How to change image\parameters on style definition ? Pin
Abhinav S19-Oct-10 3:55
Abhinav S19-Oct-10 3:55 
Questioncombo box items are not going up/down from keyboard arrow keys. Pin
SRKSHOME17-Oct-10 23:13
SRKSHOME17-Oct-10 23:13 
QuestionWPF MVVM design time data? Pin
SledgeHammer0117-Oct-10 19:42
SledgeHammer0117-Oct-10 19:42 
AnswerRe: WPF MVVM design time data? Pin
SledgeHammer0117-Oct-10 20:03
SledgeHammer0117-Oct-10 20:03 
QuestionA few newb MVVM (WPF) questions... Pin
SledgeHammer0117-Oct-10 16:53
SledgeHammer0117-Oct-10 16:53 
AnswerRe: A few newb MVVM (WPF) questions... Pin
Abhinav S17-Oct-10 18:17
Abhinav S17-Oct-10 18:17 
AnswerRe: A few newb MVVM (WPF) questions... Pin
Mycroft Holmes17-Oct-10 23:40
professionalMycroft Holmes17-Oct-10 23:40 
AnswerRe: A few newb MVVM (WPF) questions... Pin
Pete O'Hanlon18-Oct-10 0:32
mvePete O'Hanlon18-Oct-10 0:32 
GeneralRe: A few newb MVVM (WPF) questions... Pin
SledgeHammer0118-Oct-10 7:57
SledgeHammer0118-Oct-10 7:57 
GeneralRe: A few newb MVVM (WPF) questions... Pin
Pete O'Hanlon18-Oct-10 9:55
mvePete O'Hanlon18-Oct-10 9:55 
GeneralRe: A few newb MVVM (WPF) questions... Pin
SledgeHammer0118-Oct-10 10:37
SledgeHammer0118-Oct-10 10:37 
GeneralRe: A few newb MVVM (WPF) questions... Pin
Pete O'Hanlon19-Oct-10 2:18
mvePete O'Hanlon19-Oct-10 2:18 
AnswerRe: A few newb MVVM (WPF) questions... Pin
si61821-Oct-10 19:33
si61821-Oct-10 19:33 
AnswerRe: A few newb MVVM (WPF) questions... [SOLUTION] Pin
AndrewSmith22-Oct-10 17:08
AndrewSmith22-Oct-10 17:08 
QuestionConnect silverlight project to web project. Pin
dbrenth15-Oct-10 10:55
dbrenth15-Oct-10 10:55 
AnswerRe: Connect silverlight project to web project. Pin
Abhinav S15-Oct-10 18:41
Abhinav S15-Oct-10 18:41 

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.