Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to bind to TokenizingTextBox SelectedItems #4712

Open
lukedukeus opened this issue Aug 2, 2022 · 1 comment
Open

Unable to bind to TokenizingTextBox SelectedItems #4712

lukedukeus opened this issue Aug 2, 2022 · 1 comment
Labels
controls 🎛️ feature request 📬 A request for new changes to improve functionality
Milestone

Comments

@lukedukeus
Copy link

Describe the problem

I have a TokenizingTextBox control that I would like to bind to like this:
Page.xaml:

                <controls:TokenizingTextBox
                    SelectedItems="{x:Bind Viewmodel.SelectedItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                    TokenDelimiter=","/>

PageViewModel.cs:

public List<string> SelectedItems {get; set;} = new List<string>();

However this is not possible because SelectedItems is not a dependency property, and you can only access it in the code behind.

Describe the solution

I'm not sure. That's why I'm asking here. Right now, the way I am doing it is by manually updating the variable in the code behind on the focus lost event.

Alternatives

No response

Additional info

No response

Help us help you

No response

@lukedukeus lukedukeus added the feature request 📬 A request for new changes to improve functionality label Aug 2, 2022
@ghost
Copy link

ghost commented Aug 2, 2022

Hello, 'lukedukeus! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls 🎛️ feature request 📬 A request for new changes to improve functionality
Projects
Status: No status
Development

No branches or pull requests

2 participants