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

  • Home
  • SEARCH
  • 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 8594851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:17:39+00:00 2026-06-12T00:17:39+00:00

I have a .xaml file which has a listview. Listview has 2 items inside

  • 0

I have a .xaml file which has a listview. Listview has 2 items inside which are bind in a following way:

<ListView  Name="listView" ItemsSource="{Binding DeviceList}" SelectedItem="{Binding ConnectedDevice, Mode=TwoWay}" >
        <ListView.View>
            <GridView>
                <GridViewColumn Width="300" Header="Name" DisplayMemberBinding="{Binding Description}" />
                <GridViewColumn Width="240" Header="Connection Status" DisplayMemberBinding="{Binding DeviceName}" />
            </GridView>
        </ListView.View>
    </ListView>

Both Description and Devicename are part of ModelClass.In My ViewModel class I am able to extract the Device name as well as Description from the hardware I have connected.

    public ObservableCollection<ComDeviceInfo> DeviceList
    {
        get { return comDevices; }
        set
        {
            comDevices = value;
            NotifyPropertyChanged("DeviceList");
        }
    }

    public ComDeviceInfo ConnectedDevice
    {
        get { return connectedDevice; }
        set
        {
            connectedDevice = value;
            NotifyPropertyChanged("ConnectedDevice");
        }
    }        

    //Called Inside Constructor
    private void checkForDevicesTimer_Elapsed(Object source, ElapsedEventArgs e)
    {            
        DeviceList = ComDeviceManagement.FindDevices();            
    }

Here ComDeviceManagement is my class which has FINDDevices() which returns me the devicename and description. U can notice DeviceList = ComDeviceManagement.FindDevices() above which indicates both the descrip and name are present inside the list.

Everything is working fine. But What I basically want is to display both the Devicename and Description in One Column rather than two separate columns. Well the problem I am facing here is with Devicename and Description. Even though they both display different values, Isn’t their a way where I can concatinate them and display both the values into a single Column??? You may notice another column in .xaml file but I want to display(concatenate) both these inside my single column in listView.
How can i do that?

Please help!!

  • 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-12T00:17:40+00:00Added an answer on June 12, 2026 at 12:17 am

    Two approaches

    In the ComDeviceInfo class just add a property that concatenates

      public string DescName 
      {
          get 
          {
               return Description + " " + Name;
          }
      {
    
    <GridViewColumn Width="300" Header="Name" DisplayMemberBinding="{Binding DescName}" />
    

    Or use a multi-value converter

    MultiBinding.Converter

    Will provided and example.

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

Sidebar

Related Questions

I have a WPF/C# 4.0 App which has an Application file XAML that is:
I have two projects, a resourcelibrary which holds a xaml file that simply has
I have a .xaml file and a .cs file that share value with Binding.
I have a xaml file with this code: <GridViewColumn x:Name=lvCol3 Header=Quantità Width=120> <GridViewColumn.CellTemplate> <DataTemplate>
I have following XAML: <TextBlock HorizontalAlignment=Center VerticalAlignment=Center FontSize=10 FontFamily=Arial Foreground=#414141> <Run Text={Binding LoadsCount} />
I have a listbox which has couple of items. When double clicked on each
I have an XML file with the following structure: <Products> <Product name=MyProduct1> <Components> <Component
I have 2 Xaml files, one containing a DataTemplate which has a resource definition
In my XAML file, I have a ListBox declared like this : <ListBox x:Name=lstDeck
I have a parent window which has a ListView that is bound to an

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.