I am trying to make custom control and bind that to static field. I'm kinda stuck but this is how I would want it to work:
<BooleanControl desc="Description" bind = {Binding Save.b}/> Desc would be the description for the checkBox, Save is class that holds the field b which needs to be binded to the control.
I'm making custom control because I also need to be able to make the control by giving description and reference to the field to constructor.
Here's what I have now:
public partial class BooleanControl : UserControl { public string desc { set; get; } public BooleanControl() { InitializeComponent(); } } But I am not sure if this is the right way to do it, since I am not going to change the description, I just need to set it in designer and by giving the value to constructor. I am still missing the part where I update Save.b according to the value of checkbox (inside BooleanControl) because I'm not sure what is the right way to do it.