Пример #1
0
        private static void SetValues(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NoteControl noteControl = d as NoteControl;

            if (noteControl != null)
            {
                noteControl.titleTextBlock.Text   = (e.NewValue as Note).Title;
                noteControl.editedTextBlock.Text  = (e.NewValue as Note).UpdatedTime.ToShortDateString();
                noteControl.contentTextBlock.Text = (e.NewValue as Note).Title;
            }
        }
        private static void SetValue(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NoteControl nc = d as NoteControl;

            if (nc != null)
            {
                nc.titleTextBlock.Text   = (e.NewValue as Model.Note).Titel;
                nc.editedTextBlock.Text  = (e.NewValue as Model.Note).UpdatedTime.ToShortDateString();
                nc.contentTextBlock.Text = (e.NewValue as Model.Note).Titel;
            }
        }
Пример #3
0
        private static void SetValue(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NoteControl note = d as NoteControl;

            if (note != null)
            {
                note.titleTextblock.Text   = (e.NewValue as Note).Title;
                note.createdTextblock.Text = "Created: " + (e.NewValue as Note).CreatedTime.ToShortDateString();
                note.updatedTextblock.Text = "Last updated: " + (e.NewValue as Note).UpdatedTime.ToShortDateString();
            }
        }
Пример #4
0
        private static void setValue(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NoteControl note = d as NoteControl;

            if (note != null)
            {
                note.txtTitle.Text   = (e.NewValue as Note).Title;
                note.txtEdited.Text  = (e.NewValue as Note).UpdatedTime.ToShortTimeString();
                note.txtContent.Text = (e.NewValue as Note).Title;
            }
        }