Click here to Skip to main content
15,910,277 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: control is not accessible in code behind Pin
SledgeHammer016-Jan-12 4:50
SledgeHammer016-Jan-12 4:50 
GeneralRe: control is not accessible in code behind Pin
SRKSHOME9-Jan-12 3:21
SRKSHOME9-Jan-12 3:21 
AnswerRe: control is not accessible in code behind Pin
manognya kota5-Jan-12 23:45
manognya kota5-Jan-12 23:45 
GeneralRe: control is not accessible in code behind Pin
Pete O'Hanlon5-Jan-12 23:55
mvePete O'Hanlon5-Jan-12 23:55 
GeneralRe: control is not accessible in code behind Pin
manognya kota6-Jan-12 0:07
manognya kota6-Jan-12 0:07 
QuestionParse string not working Pin
Dammie25-Jan-12 2:29
Dammie25-Jan-12 2:29 
AnswerRe: Parse string not working Pin
Pete O'Hanlon5-Jan-12 2:48
mvePete O'Hanlon5-Jan-12 2:48 
QuestionWPF ListBox With Radio Buttons Pin
Kevin Marois4-Jan-12 18:33
professionalKevin Marois4-Jan-12 18:33 
I am working on this dialog[^]

The part data in the center is a ListBox. I want to add radio buttons to each list row so that it will then look like this[^](I mocked this up). Each row can be always expanded an non-collapsable.

So, I have this xaml:

<Window.Resources>
    <HierarchicalDataTemplate DataType="{x:Type model:PartDescriptionUpdateModel}"
                              ItemsSource="{Binding Path=Descriptions}">
        <StackPanel Orientation="Horizontal">
            <Image Source="/Abtech.Spares.UI;component/Media/Graphics/lancard_enabled_128x128.png"
                   Height="16"
                   Width="16"
                   Margin="0,0,3,0"/>
            <TextBlock Text="{Binding Path=PartNo}"/>
            <Label Content=" - "/>
            <TextBlock Text="{Binding Path=Description}"/>
        </StackPanel>

    </HierarchicalDataTemplate>

</Window.Resources>


<Grid>

    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition Height="*"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition></ColumnDefinition>
    </Grid.ColumnDefinitions>

    <!--List of part info-->
    <ListBox x:Name="lstParts"
             Grid.Row="2"
             Margin="5"
             ItemsSource="{Binding PartsData}"/>

</Grid>


I am not sure how to add to the data template to get the radio buttons in there. Anyone know how to do this?

Mank thanks
Everything makes sense in someone's mind

AnswerRe: WPF ListBox With Radio Buttons Pin
SledgeHammer015-Jan-12 5:01
SledgeHammer015-Jan-12 5:01 
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 
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 

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.