Can a WPF base class contain a control for a derived class?
- by Number8
Hello,
I have several UserControls that have some of the same controls doing the same job.
Is it possible to extract those controls into a base class?
When I have tried it, I get an error that the definition in the generated .g.cs file will hide the parent def.
What I would like to do:
public class ctlBase : UserControl
{
internal CheckBox chkBox { get; set; }
}
In the .xaml of the derived class:
<Grid>
<CheckBox x:Name="chkBox" />
</Grid>
public class DerivedCtl : ctlBase
{ }
Thanks for any insights...