UserControl binding to ContentControl's Content
Hey, I wanna bind my UserControl *uc to ContentControl's Content so I have declared my UserControl in class
Then I create in method new UserControl
Here is my NsProp
And here is my ContentControl
And it only works if I Create UserControl in constructor it works..
In method OnTab2Focused nothing happens. Yes that method fires.
Am I missing something?
Code: Select all
Ptr<UserControl> uc;
Code: Select all
void TestMenuContent::OnTab2Focused(BaseComponent * param)
{
uc = MakePtr<Tab2Content>();
NS_UNUSED(param);
}
Code: Select all
NsProp("ContentTest", &TestMenuContent::uc);
Code: Select all
<Grid Background="Black" Height="450" VerticalAlignment="Top" Opacity="1">
<ContentControl Content="{Binding ContentTest}"/>
</Grid>
In method OnTab2Focused nothing happens. Yes that method fires.
Am I missing something?
- KeldorKatarn
- Posts: 193
- Joined:
Re: UserControl binding to ContentControl's Content
I'm not sure what you are trying to do here but I can already tell you that it's now how you do things. You don't use controls behind the scenes. They need to be an actual part of the tree.
Who is online
Users browsing this forum: Google [Bot] and 14 guests