❔ XAML accessing property of parent views element
I have this structure in XAML:
In the code behind of
but couldnt get anything to show on button press.
<RelativeLayout>
<Grid1>
<tabView>
<tabView.Item>
<MyView>
<Grid2>
<MyView2 x:Name="MyView2" IsVisible = false>In the code behind of
MyView I want to set MyView2's IsVisible property to true on a button click. I tried it using Parent.Parent.Parent.Parent.FindByName<MyView2>("MyView2").IsVisible = true; but couldnt get anything to show on button press.