Beispiel #1
0
        private void SettingBinding()
        {
            Tool.InitSetting();
            Settings model = JsonConvert.DeserializeObject <Settings>(File.ReadAllText(Environment.CurrentDirectory + "\\setting.json"));

            Binding binding = new Binding("isNet")
            {
                Source = model
            };

            Model1.SetBinding(RadioButton.IsCheckedProperty, binding);
            Model2.IsChecked = !Model1.IsChecked.Value;
        }