Custom WPF user control via repositionable child control
I need your help.
I would like to develope a WPF user control via these features: 1. Control should be able to have a content. 2. We should be able to define a position at parent control, where child control should be rendered.
It doesn't seems to be a difficult case, but I insistently can not find any helpfull information. Any information appreciated - I am only begining to learn WPF.
Thanks is advance. :)
[Update]
- In "开发者_如何学CHost control" - PartSelectorList: 1.1. Xaml: < ContentControl Content="{Binding Path=Dummy}" Height="50" Visibility="Visible" /> 1.2. Code-behind: DependencyProperty DummyProperty
- In "Final control": 2.1. Xaml: ... < PartSelectorList> < PartSelectorList.Dummy> < StackPanel /> < /PartSelectorList.Dummy> < /PartSelectorList>
why not do something really simple
<ContentControl Canvas.Left="10" Canvas.Top="20"> ..content here</ContentControl>
精彩评论