This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I add a button in a customize node, I rewrite the controltemplate, not only the datatemplate, but the button is not clickable, when the mouse is hovering on it, the cursor is SizeAll, I guess it must covered by something (maybe the mover thumb), because I see the default text box present in ContentPresenter is editable. So, do you know how to make that button clickable? Thanks. |
|
|
Hello Jzhou Sounds like you have put the button underneath the MoveThumb. Try rearranging your template to put the Button at the same level in the visual tree as the ContentPresenter. If you need any help with this. Send me your template and I'll advise you in how to rearrange it. Jason Fauchelle |
|
|
Hello, here is my test style, in the NodeBorder, I have a toggle button and the text box, both of them are hidden by the move thumb, if I remove the move thumb, then they can work. But the default text box present by content presenter can work correctly. The content presenter here is only for test, in my real code I don't use it to present any thing, and I apply this style to a group node.
|
|
|
Hello jzhou To solve this issue, you should move the StackPanel to the same place as the ContentPresenter. The NodeBorder should stay where it is though. This way, the button and text box will be on top of the MoveThumb so the mouse can reach them. When you do this, you may notice that putting the mouse over the labels and image don't allow you to move the node. To resolve this, you'd simply set the IsHitTestVisible property to False on those elements. Let me know if you have more questions about templating the group nodes. Jason Fauchelle |
|