C
C#2y ago
JJ

❔ [WPF] How to input ComboBox into TextBlock

I wanna locate combobox's location in TextBlock inner when I Click TextBlock on mouseRightDownClick event https://paste.mod.gg/yjkugolgnlcs/3 this is my code. I think combobox can't make in xaml file. just can make in cs file. but I don't know how to input combobox to TextBlock inner
BlazeBin - yjkugolgnlcs
A tool for sharing your source code with the world!
8 Replies
HimmDawg
HimmDawg2y ago
So, I suppose you want to show some kind of context menu at the location of the combobox and you need to find the location for that?
JJ
JJOP2y ago
yes, that context menu is that TextBlock. Im doing clone coding target of Sticky notes , and you can find in picture that i want
JJ
JJOP2y ago
https://paste.mod.gg/yjkugolgnlcs/3 this is my code, and I think combobox can't make in xaml file. just can make in cs file
BlazeBin - yjkugolgnlcs
A tool for sharing your source code with the world!
HimmDawg
HimmDawg2y ago
You have to add a contextmenu element to your textblock It already exists 😄 you just have to put in, what you need https://wpf-tutorial.com/common-interface-controls/contextmenu/
JJ
JJOP2y ago
thanks your solution I try it !
JJ
JJOP2y ago
ContextMenu Overview - WPF .NET Framework
This article provides an overview of the ContextMenu class, which represents the element that exposes functionality by using a context-specific Menu.
HimmDawg
HimmDawg2y ago
foxNosy 👍
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server