ItemsControl with ItemsSource and Fixed Content #16237
Unanswered
ThomasLee-Factbook
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to build a tags editor, which I'm making out of an ItemsControl and AutoCompleteBox, e.g. the red is an itemscontrol and green autocompletebox
![image](https://private-user-images.githubusercontent.com/45354879/345928329-6a661776-4d1f-4064-82e7-7a38b4deadb7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1Mjk4MDAsIm5iZiI6MTcyMDUyOTUwMCwicGF0aCI6Ii80NTM1NDg3OS8zNDU5MjgzMjktNmE2NjE3NzYtNGQxZi00MDY0LTgyZTctN2EzOGI0ZGVhZGI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEyNTE0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzNzdmZDM5NzE5ZTNhZDhlNDNhYjk3OGFiNTcyMGQ0YTdmODFiOGUzNWZhNDkxYzM3MGRhZDkyYmE4Y2FiZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-S_0zKIIkDAjd7QnOeN-S66Sf9aqxcbYbVUEgOygB-k)
Currently I have axaml like:
I would like to move the AutoCompleteBox into the WrapPanel of the PART_Tags ItemsControl, e.g. to have both dynamic and fixed content, e.g. something like:
This would sort out some layout issues I'm having, as the AutoCompleteBox would then always be inline with the last row of the wrap panel.
The only way I've figured out how to do this so far is to use a value converter and append a marker to the end of the Tags, and then pick that up to show the AutoCompleteBox using a DataTemplateSelector, e.g...
This isn't ideal however as I need to get the AutoCompleteBox, e.g. to detect when keys are pressed or it set the focus. So being able to have it as a sibling of the ItemsControl and injecting it would be a real help but I can't figure out how to do that.
Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions