Click here to Skip to main content
15,359,445 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 15:43
MemberGil Yoder2-Feb-12 15:43 
SuggestionRe: GridSplitter Conundrum Pin
Gil Yoder2-Feb-12 18:59
MemberGil Yoder2-Feb-12 18:59 
GeneralRe: GridSplitter Conundrum Pin
SledgeHammer013-Feb-12 7:17
MemberSledgeHammer013-Feb-12 7:17 
Questionadding/removing ListView columns at runtime (revisited) Pin
Vincent Beek1-Feb-12 0:20
MemberVincent Beek1-Feb-12 0:20 
AnswerRe: adding/removing ListView columns at runtime (revisited) Pin
Abhinav S1-Feb-12 0:36
MemberAbhinav S1-Feb-12 0:36 
GeneralRe: adding/removing ListView columns at runtime (revisited) Pin
Mycroft Holmes1-Feb-12 11:53
professionalMycroft Holmes1-Feb-12 11:53 
QuestionBinding list of items to IntemsControl in WPF Pin
rams230-Jan-12 23:14
Memberrams230-Jan-12 23:14 
AnswerRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard31-Jan-12 0:10
professionalWayne Gaylard31-Jan-12 0:10 
You are going to have to put EmployeeDetails in another items container, as the way you have it now, it is not binding to the collection. So, instead of
XML
<Grid Height="50">
      <Grid.RowDefinitions>
           <RowDefinition Height="25" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
           <ColumnDefinition Width="100" />
           <ColumnDefinition Width="100" />
      </Grid.ColumnDefinitions>
      <TextBlock Grid.Column="0" HorizontalAlignment="Center" 
                    VerticalAlignment="Center" Text="{Binding EmployeeDetails.Name}" 
                    TextWrapping="Wrap" FontSize="10"/>
      <TextBlock Grid.Column="1" HorizontalAlignment="Center" 
                    VerticalAlignment="Center" Text="{Binding EmployeeDetails.Salary}" 
                    TextWrapping="Wrap" FontSize="10"/>
       </Grid>


you should have something like this
XML
<ItemsControl ItemsSource="{Binding Path=EmployeeDetails}">
    <ItemsControl.ItemTemplate>
       <DataTemplate>
          <Grid>
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="Auto"/>
                 <ColumnDefinition Width="Auto"/>
             </Grid.ColumnDefinitions>
             <TextBlock Grid.Column="0" HorizontalAlignment="Center" 
                           VerticalAlignment="Center" Text="{Binding Name}" 
                           TextWrapping="Wrap" FontSize="10" Margin="5"/>
             <TextBlock Grid.Column="1" HorizontalAlignment="Center" 
                           VerticalAlignment="Center" Text="{Binding Salary}" 
                           TextWrapping="Wrap" FontSize="10" Margin="5" />
          </Grid>
       </DataTemplate>
    </ItemsControl.ItemTemplate>
</ItemsControl>

When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman


modified 31-Jan-12 6:23am.

GeneralRe: Binding list of items to IntemsControl in WPF Pin
rams231-Jan-12 0:36
Memberrams231-Jan-12 0:36 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard31-Jan-12 0:39
professionalWayne Gaylard31-Jan-12 0:39 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Abhinav S1-Feb-12 16:26
MemberAbhinav S1-Feb-12 16:26 
GeneralRe: Binding list of items to IntemsControl in WPF Pin
Wayne Gaylard1-Feb-12 19:06
professionalWayne Gaylard1-Feb-12 19:06 
QuestionFocusing on elements in MVVM Pin
mi_n30-Jan-12 22:42
Membermi_n30-Jan-12 22:42 
AnswerRe: Focusing on elements in MVVM Pin
Pete O'Hanlon30-Jan-12 23:03
mvaPete O'Hanlon30-Jan-12 23:03 
GeneralRe: Focusing on elements in MVVM Pin
Pete O'Hanlon31-Jan-12 3:34
mvaPete O'Hanlon31-Jan-12 3:34 
GeneralRe: Focusing on elements in MVVM Pin
Wayne Gaylard31-Jan-12 3:39
professionalWayne Gaylard31-Jan-12 3:39 
GeneralRe: Focusing on elements in MVVM Pin
Pete O'Hanlon31-Jan-12 3:47
mvaPete O'Hanlon31-Jan-12 3:47 
GeneralRe: Focusing on elements in MVVM Pin
Wayne Gaylard31-Jan-12 3:56
professionalWayne Gaylard31-Jan-12 3:56 
GeneralRe: Focusing on elements in MVVM Pin
SledgeHammer0131-Jan-12 5:11
MemberSledgeHammer0131-Jan-12 5:11 
GeneralRe: Focusing on elements in MVVM Pin
SledgeHammer0131-Jan-12 6:18
MemberSledgeHammer0131-Jan-12 6:18 
GeneralRe: Focusing on elements in MVVM Pin
SledgeHammer0131-Jan-12 6:56
MemberSledgeHammer0131-Jan-12 6:56 
GeneralRe: Focusing on elements in MVVM Pin
SledgeHammer0131-Jan-12 7:50
MemberSledgeHammer0131-Jan-12 7:50 
GeneralRe: Focusing on elements in MVVM Pin
mi_n31-Jan-12 6:58
Membermi_n31-Jan-12 6:58 
GeneralRe: Focusing on elements in MVVM Pin
SledgeHammer0131-Jan-12 7:21
MemberSledgeHammer0131-Jan-12 7:21 
GeneralRe: Focusing on elements in MVVM Pin
mi_n31-Jan-12 9:36
Membermi_n31-Jan-12 9: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.