public TagEditorControl()
        {
            InitializeComponent();

            ObjAddControl.OnNewTag += ObjAddControl_OnNewTag;

            // Register for notifications of changes to the COMPONENT's TagsBundle
            wdpcn = new WeakDependencyPropertyChangeNotifier(this, TagsBundleProperty);
            wdpcn.ValueChanged += OnTagsBundlePropertyChanged;
        }
        public BibTeXEditorControl()
        {
            InitializeComponent();

            // The error panel
            ObjErrorPanel.Background       = ThemeColours.Background_Brush_Warning;
            ObjErrorPanel.Opacity          = .3;
            ObjErrorPanel.IsHitTestVisible = false;

            // Initial visibility
            ObjErrorPanel.Visibility = Visibility.Collapsed;

            ObjBibTeXGrid.Visibility = Visibility.Visible;
            ObjTextPanel.Visibility  = Visibility.Collapsed;

            // Register for notifications of changes to the COMPONENT's bibtex
            wdpcn = new WeakDependencyPropertyChangeNotifier(this, BibTeXProperty);
            wdpcn.ValueChanged += OnBibTeXPropertyChanged;

            ComboRecordType.ItemsSource = EntryTypes.Instance.EntryTypeList;

            ObjBibTeXText.TextChanged += ObjBibTeXText_TextChanged;
            TxtRecordKey.TextChanged  += OnGridTextChanged;

            ComboRecordType.SelectionChanged += ComboRecordType_SelectionChanged;
            ComboRecordType.KeyUp            += ComboRecordType_KeyUp;

            ComboRecordTypeHeader.ToolTip =
                ComboRecordType.ToolTip   =
                    "Please select the type of reference this points to.\nThis affects the way Qiqqa InCite and BibTeX format the reference in your bibliographies.";

            TxtRecordKeyHeader.ToolTip =
                TxtRecordKey.ToolTip   =
                    "Please enter a BibTeX key for this article.\nIt needs to be unique in your library as it is used to identify this reference when you use Qiqqa InCite or in LaTeX when you use the \\cite{KEY} command.";

            ImageBibTeXParseError.Visibility = Visibility.Collapsed;
            ImageBibTeXParseError.ToolTip    = null;
            ImageBibTeXParseError.Source     = Icons.GetAppIcon(Icons.BibTeXParseError);
            RenderOptions.SetBitmapScalingMode(ImageBibTeXParseError, BitmapScalingMode.HighQuality);

            ImageBibTeXModeToggle.Visibility = Visibility.Visible;
            ImageBibTeXModeToggle.ToolTip    = "Toggle between a BibTeX grid and raw BibTeX text.";
            ImageBibTeXModeToggle.Source     = Icons.GetAppIcon(Icons.Switch);
            RenderOptions.SetBitmapScalingMode(ImageBibTeXModeToggle, BitmapScalingMode.HighQuality);
            ImageBibTeXModeToggle.Cursor     = Cursors.Hand;
            ImageBibTeXModeToggle.MouseDown += ImageBibTeXModeToggle_MouseDown;

            RebuidTextAndGrid();
        }