My presenter defines its own view:
public SmartFormPresenter(SmartFormView view)
{
View = view;
View.DataContext = this;
}
In the view I have an element with x:Name="MainTabControl":
<DockPanel LastChildFill="True">
<TabControl x:Name="MainTabControl" DockPanel.Dock="Top" ItemsSource="{Binding SmartFormAreaPresenters}">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Header" Value="{Binding Title}"/>
</Style>...
How can I access this element as I do in code behind, something like this:
PSEUDO-CODE:
View.Root.Children.MainTabControl.Visibility = Visibility.Collapsed;