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 8377347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:39:01+00:00 2026-06-09T15:39:01+00:00

In code i add columns to listview successfuly. But i want add binding to

  • 0

In code i add columns to listview successfuly. But i want add binding to column than add to listview.

fist is working code in xaml.

<GridViewColumn x:Name="colName" Header="Name" Width="130">
  <GridViewColumn.CellTemplate>
    <DataTemplate>
      <TextBlock Text="{Binding Path=Values, Converter={StaticResource LoadProfileConverter},ConverterParameter=active_total}"/>
    </DataTemplate>
  </GridViewColumn.CellTemplate>
</GridViewColumn>

Code behind:

GridViewColumn column = new GridViewColumn();
column.Header = "Header";
column.Width = 130;                     

FrameworkElementFactory controlFactory = new FrameworkElementFactory(typeof(TextBlock));

var itemsBinding = new System.Windows.Data.Binding("Values")
{
    Converter = new LoadProfileConverter(),
    ConverterParameter = "active_total",
};

controlFactory.SetBinding(TextBox.TextProperty, itemsBinding);

DataTemplate template = new DataTemplate();
template.VisualTree = controlFactory;

column.CellTemplate = template;

LoadProfileGrid.Columns.Add(column);
  • 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-09T15:39:03+00:00Added an answer on June 9, 2026 at 3:39 pm
    var itemsbinding = new Binding("Values")
                {
                    Converter = new LoadProfileConverter(),
                    ConverterParameter = key
                };
    
            controllerFactory.SetBinding(TextBox.TextProperty, itemsbinding);
    

    Create a proper binding using the code above.

    Loads of extra properties on the binding object that can assist you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this XAML code for the ListView: <ListView> <ListView.View> <GridView> <GridViewColumn DisplayMemberBinding={Binding Path=Flag}
I have to add two columns in a ListView . One column shows different
I want to add several buttons to a asp.net listview column for processing. Admin
I have a listview where I add several columns: LVCOLUMN column; column.mask = LVCF_FMT
I have the following wpf control added to xaml: <ListView Margin=22,80,271,12 Name=listView1 ItemsSource={Binding} />
I have a grid view and I add columns to it by code: //Retrieve
I would like to add a column from behind code to a data bound
I want to add code php to variable with html, for example $html =
I have this: lvPalette.Columns.Add(Code, -2, HorizontalAlignment.Center); lvPalette.Columns.Add(Attendu, -2, HorizontalAlignment.Center); lvPalette.Columns.Add(Chargé, -2, HorizontalAlignment.Center); lvPalette.Columns.Add(Validé, -2,
I have below code in my Form Load event handler but the ListView doesn't

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.