Click here to Skip to main content
15,916,693 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 5:39
professionalKevin Marois5-Jan-12 5:39 
GeneralRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 6:37
SledgeHammer015-Jan-12 6:37 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 7:26
professionalKevin Marois5-Jan-12 7:26 
GeneralRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 7:54
SledgeHammer015-Jan-12 7:54 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 8:09
professionalKevin Marois5-Jan-12 8:09 
GeneralRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 8:16
SledgeHammer015-Jan-12 8:16 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 8:18
professionalKevin Marois5-Jan-12 8:18 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 8:22
professionalKevin Marois5-Jan-12 8:22 
Ok, I see...

So, in this XAML

<Window.Resources>

    <HierarchicalDataTemplate DataType="{x:Type model:PartDescriptionUpdateModel}"
								ItemsSource="{Binding Path=Descriptions}">

        <StackPanel Orientation="Vertical">
                
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Path=PartNo}"/>
                <Label Content=" - "/>
                <TextBlock Text="{Binding Path=Description}"/>
            </StackPanel>
                
            <ItemsControl ItemsSource="{Binding Descriptions}"
                            Margin="10, 0, 0, 20">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <RadioButton Content="{Binding PartDescription}"/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
                
        </StackPanel>
            
    </HierarchicalDataTemplate>

</Window.Resources>


I think it's as you described... The LisBox is bound to a list of PartDescriptionUpdateModels. They have the PartNumber and Description.

The ItemsControl is bound to Descriptions, wich is the subitems list on the PartDescriptionUpdateModel. Still, the ItemsControl feels wrong.
Everything makes sense in someone's mind

GeneralRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 8:30
SledgeHammer015-Jan-12 8:30 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 11:09
professionalKevin Marois5-Jan-12 11:09 
GeneralRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 11:18
SledgeHammer015-Jan-12 11:18 
GeneralRe: WPF ListBox With Radio Buttons Pin
Kevin Marois5-Jan-12 11:34
professionalKevin Marois5-Jan-12 11:34 
QuestionListbox / Button Text update Pin
Member 84777754-Jan-12 12:05
Member 84777754-Jan-12 12:05 
AnswerRe: Listbox / Button Text update Pin
SledgeHammer014-Jan-12 12:35
SledgeHammer014-Jan-12 12:35 
GeneralRe: Listbox / Button Text update Pin
Member 84777754-Jan-12 12:40
Member 84777754-Jan-12 12:40 
GeneralRe: Listbox / Button Text update Pin
SledgeHammer014-Jan-12 13:36
SledgeHammer014-Jan-12 13:36 
GeneralRe: Listbox / Button Text update Pin
Member 84777754-Jan-12 13:40
Member 84777754-Jan-12 13:40 
GeneralRe: Listbox / Button Text update Pin
SledgeHammer014-Jan-12 14:45
SledgeHammer014-Jan-12 14:45 
QuestionDrawing semitransparent rectangle Pin
Member 29654714-Jan-12 11:40
Member 29654714-Jan-12 11:40 
QuestionFlat toggle button in Silverlight 4 Pin
AChatelain4-Jan-12 11:05
AChatelain4-Jan-12 11:05 
Question[HttpWebRequest_WebException_RemoteServer] Pin
narayanagvs3-Jan-12 1:56
narayanagvs3-Jan-12 1:56 
QuestionAvoid flicker Pin
Member 29654713-Jan-12 1:35
Member 29654713-Jan-12 1:35 
AnswerRe: Avoid flicker Pin
Pete O'Hanlon3-Jan-12 1:47
mvePete O'Hanlon3-Jan-12 1:47 
GeneralRe: Avoid flicker Pin
Member 29654713-Jan-12 2:00
Member 29654713-Jan-12 2:00 
GeneralRe: Avoid flicker Pin
Pete O'Hanlon3-Jan-12 2:07
mvePete O'Hanlon3-Jan-12 2:07 

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.