Please see my comment to the question.
You are trying to capture the mouse to the element which is not even rendered. How could it possibly work? Mouse should be captured sometimes, but it should be done only temporarily, for relatively short period of time. For example, you can implement button-like behavior, if you capture mouse in its
MouseDown
event, to be able to handle a
MouseUp
event (for example), even when the mouse pointer goes out of the element's boundaries, but then the mouse should be un-captured in the handle on this second event immediately. This is just an example.
Please see:
https://msdn.microsoft.com/en-us/library/system.windows.uielement.capturemouse%28v=vs.110%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/system.windows.input.mouse.capture%28v=vs.110%29.aspx[
^].
Read "Remarks" section thoroughly. Any questions?
—SA