Click here to Skip to main content
15,888,297 members
Home / Discussions / WPF
   

WPF

 
QuestionCustom Control Template for beginners Pin
jeffdavis870329-Jan-13 9:12
jeffdavis870329-Jan-13 9:12 
AnswerRe: Custom Control Template for beginners Pin
SledgeHammer0129-Jan-13 11:32
SledgeHammer0129-Jan-13 11:32 
GeneralRe: Custom Control Template for beginners Pin
jeffdavis870329-Jan-13 12:10
jeffdavis870329-Jan-13 12:10 
GeneralRe: Custom Control Template for beginners Pin
SledgeHammer0129-Jan-13 12:46
SledgeHammer0129-Jan-13 12:46 
GeneralTreeview Selection Pin
vijilvs11628-Jan-13 23:03
vijilvs11628-Jan-13 23:03 
QuestionProblem With TreeViewItem Tooltip Pin
Kevin Marois26-Jan-13 15:39
professionalKevin Marois26-Jan-13 15:39 
GeneralRe: Problem With TreeViewItem Tooltip Pin
Thomas Duwe29-Jan-13 1:46
Thomas Duwe29-Jan-13 1:46 
QuestionHow to get a value from treeview. Pin
boryborawski26-Jan-13 12:06
boryborawski26-Jan-13 12:06 
Hello!
I have a treeview:
XML
<TreeView  
    BorderBrush="Black" 
    BorderThickness="2" 
    Cursor="Hand" 
    ItemsSource="{Binding Data, UpdateSourceTrigger=PropertyChanged}" >
    <TreeView.ItemContainerStyle>
	<Style TargetType="{x:Type TreeViewItem}">
		<Setter 
                    Property="IsSelected" 
                    Value="{Binding SelectedPath, Mode=TwoWay}" />
		</Style>
    </TreeView.ItemContainerStyle>
    <TreeView.ItemTemplate>
        <HierarchicalDataTemplate 
            ItemsSource="{
                            Binding Persons, 
                            UpdateSourceTrigger=PropertyChanged}" 
            DataType="{x:Type local:Data}" >
            <Grid>
		<StackPanel Orientation="Horizontal">
    		<TextBlock x:Name="dane" Text="{Binding ID}" Margin="0,0,5,0" />
                <Button 
                    Style="{StaticResource ButtonLikeTextBlock}" 
                    Content="{Binding DataOrName}" 
                    Command="
                            {Binding 
                                    Path=DataContext.DisplayInfoCommand, 
                                    RelativeSource = {RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
								
		</StackPanel>
            </Grid>
        </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
</TreeView>


How can i get the ID property which is in Persons list ? How can i bind it straight to viewmodel class? Can u show sample code?

Greetings, Boryborawski.
QuestionConstant header and footer Pin
columbos1492725-Jan-13 23:11
columbos1492725-Jan-13 23:11 
AnswerRe: Constant header and footer Pin
Richard MacCutchan26-Jan-13 0:05
mveRichard MacCutchan26-Jan-13 0:05 
QuestionWPF.MDI Pin
columbos1492725-Jan-13 8:37
columbos1492725-Jan-13 8:37 
AnswerRe: WPF.MDI Pin
Abhishek Pant25-Jan-13 9:29
professionalAbhishek Pant25-Jan-13 9:29 
GeneralRe: WPF.MDI Pin
columbos1492725-Jan-13 22:11
columbos1492725-Jan-13 22:11 
GeneralRe: WPF.MDI Pin
Abhishek Pant25-Jan-13 22:33
professionalAbhishek Pant25-Jan-13 22:33 
AnswerRe: WPF.MDI Pin
tram730-Nov-13 5:54
tram730-Nov-13 5:54 
QuestionSilverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf24-Jan-13 12:13
Steve Holdorf24-Jan-13 12:13 
AnswerRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
db7uk26-Jan-13 13:11
db7uk26-Jan-13 13:11 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf27-Jan-13 3:19
Steve Holdorf27-Jan-13 3:19 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
db7uk27-Jan-13 12:44
db7uk27-Jan-13 12:44 
GeneralRe: Silverlight Dispatcher.BeginInvoke not allow thread to run more then one time Pin
Steve Holdorf27-Jan-13 13:16
Steve Holdorf27-Jan-13 13:16 
QuestionSilverlight OOB access in Online Pin
Sugu.s23-Jan-13 23:09
Sugu.s23-Jan-13 23:09 
AnswerRe: Silverlight OOB access in Online Pin
Richard MacCutchan24-Jan-13 1:50
mveRichard MacCutchan24-Jan-13 1:50 
GeneralRe: Silverlight OOB access in Online Pin
Sugu.s24-Jan-13 17:31
Sugu.s24-Jan-13 17:31 
GeneralRe: Silverlight OOB access in Online Pin
Richard MacCutchan24-Jan-13 22:41
mveRichard MacCutchan24-Jan-13 22:41 
GeneralRe: Silverlight OOB access in Online Pin
Sugu.s25-Jan-13 0:36
Sugu.s25-Jan-13 0: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.