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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:20:49+00:00 2026-05-23T07:20:49+00:00

I have a converter which has a couple of input variables (an object and

  • 0

I have a converter which has a couple of input variables (an object and a TextBox) and then returns the TextBox.Text String property.

The problem I’m running into is in the ConvertBack() Method of my converter. I have no way of linking any updates back to the object since all I get is a String (the Text of the Textbox). Is there some way I can access some (if not all) the Convert() variables? Or at least know which textbox is calling ConvertBack()?

Here is my ItemsControl Code:

<ItemsControl x:Name="ItemsControlGrid" ItemsSource="{Binding Path=ProjectOrganLocation.LesionTypes, Source={StaticResource Locator}}" >
    <ItemsControl.ItemsPanel>
         <ItemsPanelTemplate>
              <StackPanel Orientation="Horizontal" />
         </ItemsPanelTemplate>
     </ItemsControl.ItemsPanel>
     <ItemsControl.ItemTemplate>
         <DataTemplate>
              <TextBox Width="75" TextAlignment="Center" >
                   <TextBox.Text>
                         <MultiBinding Converter="{StaticResource LesionTypeConverter}"  >
                              <Binding RelativeSource="{RelativeSource AncestorType={x:Type TreeViewItem}}" Path="DataContext.OrganLocation"/>
                              <Binding RelativeSource="{RelativeSource Self}" Path="." />
                          </MultiBinding>
                    </TextBox.Text>
                </TextBox>
            </DataTemplate>
      </ItemsControl.ItemTemplate>
 </ItemsControl>

And here’s a snippet from my Converter:

List<CategoryCode> Lesions = organ.getLesionTypes;

    if (organ.OrganDisplayName == organ.CurrentOrgan)
       organ.Count++;
    else
    {
       organ.Count = 0;
       organ.CurrentOrgan = organ.OrganDisplayName;
    }
return organ.Labels[organ.Count].LabelPrefix;
  • 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-05-23T07:20:49+00:00Added an answer on May 23, 2026 at 7:20 am

    Your best bet would be to add a private property to the converter class and store your values during Convert so that ConvertBack can access them. You would need to use a separate instance of the converter for each binding though.

    What are you trying to accomplish? There might be a better way to do it than a converter

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

Sidebar

Related Questions

I have an input string such as x=y|a=b|c=10 etc which gets converted to dynamic
I have a control which has a default value for a property. When the
I have a dynamic data table in JSF which has multiple input elements which
I have a currency converter application for iphone which uses web service. The web
i have variable $lang which convert string to the selected language but i am
I have a situation in which I need to convert a text data into
I have a function to convert documents into different formats, which then calls another
I have an app which has a section that needs to convert the temperature
I have a custom converter which is this : @ManagedBean @RequestScoped public class MeasureConverter
I have a model named UserPrice which has the attribute :purchase_date (a date_select) in

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.