{"id":18022992,"url":"https://github.com/kanryu/caliburnapp1","last_synced_at":"2025-04-04T18:17:37.595Z","repository":{"id":140592432,"uuid":"129597786","full_name":"kanryu/CaliburnApp1","owner":"kanryu","description":"A MVVM sample app for UWP with Caliburn.Micro","archived":false,"fork":false,"pushed_at":"2018-04-15T14:47:48.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T03:26:50.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanryu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-15T10:03:21.000Z","updated_at":"2018-04-15T14:47:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"90857437-64c4-4c8f-bedb-b1f8547b3718","html_url":"https://github.com/kanryu/CaliburnApp1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanryu%2FCaliburnApp1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanryu%2FCaliburnApp1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanryu%2FCaliburnApp1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanryu%2FCaliburnApp1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanryu","download_url":"https://codeload.github.com/kanryu/CaliburnApp1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226191,"owners_count":20904467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T07:06:35.527Z","updated_at":"2025-04-04T18:17:37.577Z","avatar_url":"https://github.com/kanryu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CaliburnApp1\n\nA MVVM sample app for UWP with Caliburn.Micro\n\nThis project for a question for the issue.\n\nhttps://github.com/Caliburn-Micro/Caliburn.Micro/issues/520\n\n\n## The problem of Caliburn.Micro this sample reveals\n\n![Execution result of this application](DemoRunning.png)\n\n- Properties of ViewModel(especialy, DayEnable) can not be referenced through a DataContext object\n- So there is no way to refer to the ViewModel of the page from the descendant of the tag with the ItemsSource attribute\n- In particular it is a serious problem that RelativeSource can not be used from the Page's own context\n\n\nPageView.xaml:\n\n    \u003cStackPanel Background=\"{ThemeResource ApplicationPageBackgroundThemeBrush}\" Margin=\"10\"\u003e\n        \u003cTextBlock Text=\"Main:\" /\u003e\n        \u003cCheckBox Content=\"DayEnable\" IsChecked=\"{Binding DayEnable}\" /\u003e\n        \u003cCheckBox Content=\"/DayEnable\" IsChecked=\"{Binding /DayEnable}\" /\u003e\n        \u003cCheckBox Content=\"DataContext.DayEnable\" IsChecked=\"{Binding DataContext.DayEnable}\" /\u003e\n        \u003cCheckBox Content=\"Path=DayEnable\" IsChecked=\"{Binding Path=DayEnable}\"/\u003e\n        \u003cCheckBox Content=\"RelativeSource DayEnable\" IsChecked=\"{Binding DayEnable, RelativeSource={RelativeSource Self}}\"/\u003e\n        \u003cItemsControl ItemsSource=\"{Binding BodiesModel}\"\u003e\n            \u003cItemsControl.Template\u003e\n                \u003cControlTemplate TargetType=\"ItemsControl\"\u003e\n                    \u003cBorder BorderThickness=\"1\" BorderBrush=\"Black\" Background=\"Azure\"\u003e\n                        \u003cItemsPresenter Margin=\"10\" /\u003e\n                    \u003c/Border\u003e\n                \u003c/ControlTemplate\u003e\n            \u003c/ItemsControl.Template\u003e\n            \u003cItemsControl.ItemTemplate\u003e\n                \u003cDataTemplate\u003e\n                    \u003cStackPanel\u003e\n                        \u003cTextBlock Text=\"Inner ItemsControl:\" /\u003e\n                        \u003cCheckBox Content=\"BodyEnable\" IsChecked=\"{Binding BodyEnable}\"/\u003e\n                        \u003cCheckBox Content=\"DayEnable\" IsChecked=\"{Binding DayEnable}\"/\u003e\n                        \u003cCheckBox Content=\"RelativeSource DayEnable\" IsChecked=\"{Binding Path=DayEnable, RelativeSource={RelativeSource TemplatedParent}}\"/\u003e\n                    \u003c/StackPanel\u003e\n                \u003c/DataTemplate\u003e\n            \u003c/ItemsControl.ItemTemplate\u003e\n        \u003c/ItemsControl\u003e\n    \u003c/StackPanel\u003e\n\nPageViewModel.cs:\n\n    public class BodyViewModel\n    {\n        public bool BodyEnable { get; set; } = true;\n    }\n    public class PageViewModel : Screen\n    {\n        public bool DayEnable { get; set; } = true;\n        public ObservableCollection\u003cBodyViewModel\u003e BodiesModel { get; set; }\n\n        private readonly INavigationService navigationService;\n        public PageViewModel(INavigationService navigationService)\n        {\n            this.navigationService = navigationService;\n\n            BodiesModel = new ObservableCollection\u003cBodyViewModel\u003e() {\n                new BodyViewModel()\n            };\n\n            NotifyOfPropertyChange(() =\u003e DayEnable);\n            NotifyOfPropertyChange(() =\u003e BodiesModel);\n\n        }\n    }\n\n\n## Author\n\nKATO Kanryu\u003ck.kanryu@gmail.com\u003e\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanryu%2Fcaliburnapp1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanryu%2Fcaliburnapp1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanryu%2Fcaliburnapp1/lists"}