Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8508975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:18:28+00:00 2026-06-11T03:18:28+00:00

I have a Listview in my app that has a ItemTemplate that has three

  • 0

I have a Listview in my app that has a ItemTemplate that has three TextBlocks.
the Listview’s ItemsSource property is set to a List named “units” in my class named “ConversionEngine”…

so my problem is: I want to Bind the second and third TextBlocks in the ItemTemplate to another List in the same “ConversionEngine” class. but I can’t, bucause the Listview’s ItemsSource property is set to “units” List of string and all the subitems of ItemTemplate inherit the “units” list. how can I Bind the sub items to another list, in the same class of ConversionEngine, or another classes that I define? Thanks… here are my codes:

The Listview:

<ListView x:Name="allunits" **ItemsSource="{Binding units}**" SelectionMode="Single" IsItemClickEnabled="True" ItemClick="allunit_itemclick" SelectedIndex="-1" ItemTemplate="{StaticResource Standard500x130ItemTemplate}"/>

The ItemTemplate Code:

<DataTemplate x:Key="Standard500x130ItemTemplate">

        <Grid Height="110" Width="480" Margin="10" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
                <Image Source="{Binding Image}" Stretch="UniformToFill"/>
            </Border>
            <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
              **<TextBlock Text="{Binding}" Style="{StaticResource TitleTextStyle}"/>**
              **<TextBlock  Text="{Binding ??}" Style="{StaticResource TitleTextStyle}/>**
              **<TextBlock  Text="{Binding ??}" Style="{StaticResource TitleTextStyle}"/>**
            </StackPanel>
        </Grid>
    </DataTemplate>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:18:29+00:00Added an answer on June 11, 2026 at 3:18 am

    Itemscontrol items can only bind to UI elements, things which can be accessed using relative source and parts of the datacontext which they are given. My suggestion would be to either consolidate your different lists into one list, or at the very least, return grouped items from your bound property. So either:

    public class CompositeItem
    {
      Item item;               //item from your first list
      Item2 item2;             //item from your second list
      . . .
    }
    
    //main class
    List<CompositeItem> items;  //list of combined items
    

    or:

    public Tuple<Item, Item2 . . . > items //bind your items control to this
    {
        List<Tuple<Item, Item2 . . >> newListOfItems = new Tuple<Item, Item2 . . >(); 
        for(int i = 0; i < items.count; i++)
        {
            newListOfItems.add(new Tuple<Item, Item2 . . >(list1[i], list2[i] . . .));
        }
        return newListOfItems;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WinRT/C#/XAML app with a view that has a vertical ListView of
In my app I have a class that extends ListActivity and uses a ListView.
I have dynamic listview on my android client app that receive data from remote
I have a WPF App that implements a ListView. I would like to show
I have a basic iPhone/iPad app which has a ; a. List view &
I have ListView that has the following EditItemTemplate: <EditItemTemplate> <tr style=> <td> <asp:LinkButton ID=UpdateButton
I have an android-app with a listview in an activity. The listview has, if
i have a listView with a custom BaseAdapter.Every list item has a clickable button.
I have a listview that displays a list of profiles added by a user.
I am working on an App that has a page with a listview and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.