Hi,
I'm trying to get the position of a context menu relative to his placement target by using MousePosition property and there is an issue.
Here's what I have :
<telerik:RadContextMenu>
<telerik:RadMenuItem Header="Add item" Command="{Binging AddItemCommand}" CommandParameter="{Binding MousePosition, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadContextMenu}}"/>
</telerik:RadContextMenu/>
When I click on "Add Item", the position that I received in the viewModel is (Double.NaN, Double.Nan), so I conclued that the value of MousePosition is updated after the evaluation of the bindings. Is there another way to get the MousePosition of the contextMenu that would works with MVVM ?
Thank you,
Etienne
I'm trying to get the position of a context menu relative to his placement target by using MousePosition property and there is an issue.
Here's what I have :
<telerik:RadContextMenu>
<telerik:RadMenuItem Header="Add item" Command="{Binging AddItemCommand}" CommandParameter="{Binding MousePosition, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadContextMenu}}"/>
</telerik:RadContextMenu/>
When I click on "Add Item", the position that I received in the viewModel is (Double.NaN, Double.Nan), so I conclued that the value of MousePosition is updated after the evaluation of the bindings. Is there another way to get the MousePosition of the contextMenu that would works with MVVM ?
Thank you,
Etienne