setting the value of a checkbox programmatically in c# (wpf)

后端 未结 3 1516
迷失自我
迷失自我 2021-02-14 01:41

I\'m working on a small wpf project using c#. I have 2 windows. When I go from one window to the next, i need to have some items preselected on the 2nd window. I have a check

3条回答
  •  甜味超标
    2021-02-14 02:18

    I'd say that you should move towards pushing the view model into the view via IoC or some other fashion. Tie the value to a property and let the framework make your life easier via binding, instead of having to hard code values all over the place.

    http://msdn.microsoft.com/en-us/library/ms752347.aspx

提交回复
热议问题