1. KeidP's Avatar
    Hi guys

    I try binding a object with object properties inside. Anything like this :

    Public class X
    {
    private Q P{get;set;}

    public Q p
    {
    get { return P; }
    set
    {
    P= value;
    RaisePropertyChanged("p");
    }
    }
    }
    }
    and Q definition is

    public class Q is

    Public class Q
    {
    private A A{get;set;}

    public A a
    {
    get { return A; }
    set
    {
    A= value;
    RaisePropertyChanged("a");
    }
    }
    }

    and A class is
    public class A
    {
    public string Name;
    }

    I send my object X with name "Data" to my datacontext but then never display in view. My Xaml is:

    <phone:PivotItem x:Name="Details" DataContext="{Binding Data}" Margin="0">
    <phone:PivotItem.Header>
    <TextBlock Text="Friend Details" FontSize="35" />
    </phone:PivotItem.Header>
    <ScrollViewer>
    <ItemsControl ItemsSource="{Binding Path=X}">
    <ItemsControl.ItemTemplate>
    <DataTemplate>
    <StackPanel>
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="175"/>
    <ColumnDefinition Width="Auto"/>
    <ColumnDefinition Width="100"/>
    <ColumnDefinition Width="100"/>
    <ColumnDefinition Width="80"/>
    </Grid.ColumnDefinitions>
    <ItemsControl ItemsSource="{Binding Path=Q}">
    <ItemsControl.ItemTemplate>
    <DataTemplate>
    <StackPanel Grid.Column="0" Orientation="Vertical" Width="Auto" HorizontalAlignment="Left" Margin="25,25,0,0">
    <TextBlock Text="{Binding Path=Name}" Foreground="Black" FontSize="22" Margin="0,5,0,0"/>

    Pls help me
    09-09-2015 11:40 AM
  2. stevesu's Avatar
    <Honestly didn't know we could post coding questions here...awesome. :-)>
    What is the issue you're having?

    Have you already run this by the folks I pass my script questions to?:
    Social.TechNet.Microsoft.com
    stackoverflow.com
    Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
    Laura Knotek likes this.
    09-09-2015 12:47 PM
  3. Laura Knotek's Avatar
    Moved to Developers Corner forum, since this is a topic that would be better suited for fellow developers, rather than ordinary users.
    09-09-2015 02:07 PM
  4. Catholic Tech Geek's Avatar
    I know it's been awhile since this post was created, but I will try my best to give a good answer anyway (for future people looking on this thread). I'm curious to know what the DataContext property of the parent of the PivotItem is. The other problem I see is that you're trying to use an ItemsControl control. ItemsControl is for use with collections. The "Data" property that you're trying to bind to isn't a collection, is it?
    12-07-2015 12:17 PM

Similar Threads

  1. How do I print a download of an email?
    By Windows Central Question in forum Ask a Question
    Replies: 2
    Last Post: 09-09-2015, 11:12 AM
  2. Seagate rolls out firmware update to address vulnerability of select portable drives
    By WindowsCentral.com in forum Windows Central News Discussion
    Replies: 0
    Last Post: 09-09-2015, 10:00 AM
  3. How can I fix an App display issue with Build 10532?
    By Windows Central Question in forum Ask a Question
    Replies: 0
    Last Post: 09-09-2015, 09:20 AM
  4. Replies: 2
    Last Post: 09-09-2015, 02:03 AM
  5. Twitter for Windows 10 picks up a minor update to version 4.1.1 with bug fixes
    By WindowsCentral.com in forum Windows Central News Discussion
    Replies: 0
    Last Post: 09-09-2015, 12:02 AM
LINK TO POST COPIED TO CLIPBOARD