public AddTag(onAddTag addTagCallback, ObservableCollection <Tag> tags)
 {
     this.AddTagCallback = addTagCallback;
     this.Tags           = tags;
     NewTag = new models.Tag();
     InitializeComponent();
     Root.DataContext = this;
     TextCompositionManager.AddTextInputHandler(this,
                                                new TextCompositionEventHandler(OnTextComposition));
 }
Esempio n. 2
0
        public EditTag(Tag tagToEdit, onEditTag editTagCallback)
        {
            InitializeComponent();
            Root.DataContext   = this;
            EditTagCallback    = editTagCallback;
            NewTag             = new models.Tag();
            NewTag.Id          = tagToEdit.Id;
            NewTag.Description = tagToEdit.Description;
            NewTag.Color       = tagToEdit.Color;
            TagColor           = System.Windows.Media.Color.FromRgb((byte)newTag.Color.Red, (byte)newTag.Color.Green, (byte)newTag.Color.Blue);

            TextCompositionManager.AddTextInputHandler(this,
                                                       new TextCompositionEventHandler(OnTextComposition));
        }