Can't focus User Control using Focus()
Posted: 07 May 2021, 09:58
Hey, I have issue, I binded UserControl from C++ to ContentControl in WPF and after create new() UserControl I can't focus that using Focus(). Take a look
focused bool returns false and I don't know why.
Note The new view is generating
I have binded currentControl using NsProp in ContentControl here:
currentControl is UserControl* type
Tab2Content class is UserControl type too
Am I missing something somewhere?
Code: Select all
currentControl = new Tab2Content();
bool focused = currentControl->Focus();Note The new view is generating
I have binded currentControl using NsProp in ContentControl here:
Code: Select all
<Grid Background="Black" Height="450" VerticalAlignment="Top" Opacity="1">
<ContentControl x:Name="RootContent" Content="{Binding Content}"/>
</Grid>Tab2Content class is UserControl type too
Am I missing something somewhere?