Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1375
TileView for DataEntry??
posted

The question was asked in the office if it possible to use the TileView control for DataEntry? More So Editing Data that has alread been entered

is this possible?

I assume it is based on the idea of putting a save button in the Data Template and wiring up the event in the XAML.  the real question would be can you get to the data objects bound to the TIleView?  the other question i was wondering is since all of the controls are in the the DataTemplate how hard is it to write something such as a group of 3 cascading dropdowns?

the current tileView i am playing around with is bound to a colletion which holds a header/ details set up.  is it going to be possible to add data to the child collection (details) from inside the tile pane?

Parents
  • 3071
    posted

    Hi spicish22,
    you can access data objects from DataTemplate.
    For example, if you have a class User and TileView is bound to some collection of users and there is button btnEdit in the DataTemplate you can acsess User object in Click eventhandler:
    private void btnEdit_Click(object sender, RoutedEventArgs e)
    {
    User user = ((Button)(sender)).DataContext as User;
    user.Name =
    "NewName";
    }
    Regards,
    Marin

Reply Children