Mouse position in xaml - wpf

Posted by Simon Fox on Stack Overflow See other posts from Stack Overflow or by Simon Fox
Published on 2010-03-18T23:21:45Z Indexed on 2010/03/18 23:51 UTC
Read the original article Hit count: 452

Filed under:
|
|
|

Hi all

Is it possible to specify the position of the mouse as the value of the Parameter property of a Command in XAML. Something like the following:

<UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Create Link"
                      Command="{Binding CreateLink}"
                      CommandParameter="{Binding Mouse.Position}" >
            </MenuItem>
        </ContextMenu>
</UserControl.ContextMenu>

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding