Beispiel #1
0
        private void ViewEntryMenuItem_OnClick(object sender, RoutedEventArgs e)
        {
            var menuItem = sender as MenuItem;

            if (menuItem != null && menuItem.DataContext is DateTime)
            {
                EntryPage.Navigate((DateTime)menuItem.DataContext);
            }
        }
Beispiel #2
0
        private void OpenEntryButton_OnClick(object sender, RoutedEventArgs e)
        {
            var button = sender as Button;

            if (button != null)
            {
                var entry = button.DataContext;
                if (entry is DateTime)
                {
                    var goToDateTime = (DateTime)entry;
                    EntryPage.Navigate(goToDateTime);
                }
            }
        }