Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAlpha_ProgDes

Posted 20 September 2012 - 05:04 PM

<StackPanel>
    <TextBlock FontFamily="Verdana" FontSize="11"
			   Margin="5,15,0,10" FontWeight="Bold">My Friends:</TextBlock>
    <ListBox Width="200" IsSynchronizedWithCurrentItem="True"
			 ItemsSource="{Binding Source={StaticResource MyFriends}}"/>
    <TextBlock FontFamily="Verdana" FontSize="11"
			   Margin="5,15,0,5" FontWeight="Bold">Information:</TextBlock>
    <ContentControl Content="{Binding Source={StaticResource MyFriends}}"
				    ContentTemplate="{StaticResource DetailTemplate}"/>
  </StackPanel>

But the ListBox must have a some sort of CurrentItem functionality. Actually I'm sure of it. In Webforms, WinForms, controls like Dropdowns and Listboxes have a property to determine what item was selected. So I can't fathom that the WPF/Silverlight Listbox would not have that same functionality.

#2Alpha_ProgDes

Posted 20 September 2012 - 05:04 PM

[color=Blue]<[/color][color=#A31515]StackPanel[/color][color=Blue]>[/color] [color=Blue]<[/color][color=#A31515]TextBlock[/color] [color=Red]FontFamily[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]Verdana[/color][color=Black]"[/color] [color=Red]FontSize[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]11[/color][color=Black]"[/color] [color=Red]Margin[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]5,15,0,10[/color][color=Black]"[/color] [color=Red]FontWeight[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]Bold[/color][color=Black]"[/color][color=Blue]>[/color]My Friends:[color=Blue]</[/color][color=#A31515]TextBlock[/color][color=Blue]>[/color] [color=Blue]<[/color][color=#A31515]ListBox[/color] [color=Red]Width[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]200[/color][color=Black]"[/color] [color=Red]IsSynchronizedWithCurrentItem[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]True[/color][color=Black]"[/color] [color=Red]ItemsSource[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]{Binding Source={StaticResource MyFriends}}[/color][color=Black]"[/color][color=Blue]/>[/color] [color=Blue]<[/color][color=#A31515]TextBlock[/color] [color=Red]FontFamily[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]Verdana[/color][color=Black]"[/color] [color=Red]FontSize[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]11[/color][color=Black]"[/color] [color=Red]Margin[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]5,15,0,5[/color][color=Black]"[/color] [color=Red]FontWeight[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]Bold[/color][color=Black]"[/color][color=Blue]>[/color]Information:[color=Blue]</[/color][color=#A31515]TextBlock[/color][color=Blue]>[/color] [color=Blue]<[/color][color=#A31515]ContentControl[/color] [color=Red]Content[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]{Binding Source={StaticResource MyFriends}}[/color][color=Black]"[/color] [color=Red]ContentTemplate[/color][color=Blue]=[/color][color=Black]"[/color][color=Blue]{StaticResource DetailTemplate}[/color][color=Black]"[/color][color=Blue]/>[/color] [color=Blue]</[/color][color=#A31515]StackPanel[/color][color=Blue]>[/color]

But the ListBox must have a some sort of CurrentItem functionality. Actually I'm sure of it. In Webforms, WinForms, controls like Dropdowns and Listboxes have a property to determine what item was selected. So I can't fathom that the WPF/Silverlight Listbox would not have that same functionality.

#1Alpha_ProgDes

Posted 20 September 2012 - 05:03 PM

But the ListBox must have a some sort of CurrentItem functionality. Actually I'm sure of it. In Webforms, WinForms, controls like Dropdowns and Listboxes have a property to determine what item was selected. So I can't fathom that the WPF/Silverlight Listbox would not have that same functionality.

<ListBox Width="200" IsSynchronizedWithCurrentItem="True"

PARTNERS