コード例 #1
0
        public ReportCatalogControl(IReportCatalogViewModel viewModel, Brush textColor)
        {
            _textColor = textColor;
            InitializeComponent();
            DataContext = viewModel;
            LoadingText.Foreground = textColor;
            ErrorText.Foreground = textColor;

            viewModel.PropertyChanged += (s, e) =>
                {
                    if(e.PropertyName == "Items")
                    {
                        RecurseItems(viewModel.Items, CatalogTree.Items);
                    }
                };
        }
コード例 #2
0
 protected virtual ReportCatalogControl CreateReportCatalogControl(
     IReportCatalogViewModel reportCatalogItemViewModel)
 {
     return new ReportCatalogControl(reportCatalogItemViewModel, new SolidColorBrush(TextColor));
 }