In one of my applications I need to allow the user to customize the user interface in certain ways. To do so, I'm allowing the user to specify the user interface in XAML, which I load dynamically when the application is started. This works fine.
Now I want to provide custom control to the user, which is derived from Border
(let's call it MyFrame
).
I need to make sure that MyFrame
may not be child of another MyFrame
, so the following should be prevented:
<ns:MyFrame>
<Grid>
<ns:MyFrame />
</Grid>
</ns:MyFrame>
How should I implement this?