I want to append a child control (button) programmatically inside a border left corner at run time based on event of a check box. my code on check box true value:
var btn = new System.Windows.Controls.Primitives.ToggleButton();
btn.Style = App.Current.Resources["ToggleButtonStyle"] as Style;
ctrlBorder.Child = btn;
ctrlBorder.Tag = btn;
Now the issue is if i am adding as child, all other controls inside the control as invisible and only btn is displayed. How can I append a btn inside a border control. Also, on unchecking the checkbox the btn should disappear.
Any help is greatly appreciated!