private void BindItems()
        {
            var viewModel = EditorViewModel;

            if (viewModel == null)
            {
                return;
            }

            var items = AssociatedElement.Items;

            if (items == null)
            {
                return;
            }

            foreach (var target in viewModel.ExportTargets)
            {
                var text = LocalizationManager.GetString($"ExportTarget_{target.NameKey}");

                var targetItem = new MenuFlyoutSubItem {
                    Text = text
                };

                foreach (var exporter in viewModel.Exporters)
                {
                    text = LocalizationManager.GetString($"Exporter_{exporter.NameKey}");

                    var viewModelParameter = new ExportModel {
                        Target = target, Exporter = exporter
                    };

                    var exportButton =
                        VisualTreeExtensions.CreateMenuItem(text,
                                                            viewModel.ExportCommand,
                                                            viewModelParameter);

                    targetItem.Items?.Add(exportButton);
                }

                items.Add(targetItem);
            }
        }
        private void BindItems()
        {
            var viewModel = EditorViewModel;

            if (viewModel == null)
            {
                return;
            }

            var items = AssociatedElement.Items;

            if (items == null)
            {
                return;
            }

            foreach (var source in viewModel.ImportSources)
            {
                var text = LocalizationManager.GetString($"ImportSource_{source.NameKey}");

                var targetItem = new MenuFlyoutSubItem {
                    Text = text
                };

                foreach (var importer in viewModel.Importers)
                {
                    text = LocalizationManager.GetString($"Importer_{importer.NameKey}");

                    var viewModelParameter = new ImportModel {
                        Source = source, Importer = importer
                    };

                    var importButton =
                        VisualTreeExtensions.CreateMenuItem(text,
                                                            viewModel.ImportCommand,
                                                            viewModelParameter);

                    targetItem.Items?.Add(importButton);
                }

                items.Add(targetItem);
            }
        }