Forums

Element access
Last Post 26 May 2016 11:09 PM by Near. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
NearUser is Offline
New Member
New Member
Posts:8


--
26 May 2016 02:41 PM
    Hi,
    I have a question, how to access to the ui element from the monogame loop ?
    I know i can set private members to public (in the generated file) and it works but the code isn't beautiful ...

    Example:

    I create a <grid> element in my xaml file and i wan't to set his Visibility to Visibility.Hidden when the user press the Space key. how can I do this ?
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    26 May 2016 05:48 PM
    Use data binding on Visibility. You can bind it to bool property of view model.
    NearUser is Offline
    New Member
    New Member
    Posts:8


    --
    26 May 2016 11:09 PM
    thanks ! good job !
    You are not authorized to post a reply.