when TabControl and Frame are used,viewmodel do not carry out
kaisame opened this issue · comments
<TabControl> <TabItem Header="OnePage"> <Frame Source="/StyletStudy;component/Pages/Test1View.xaml" /> </TabItem> <TabItem Header="TwoPage"> <Frame NavigationUIVisibility="Hidden" Source="/StyletStudy;component/Pages/Test2View.xaml" /> </TabItem> </TabControl>
frame switch to Test1View page,but Test1ViewModel do not carry out.
Program tips:
View.ActionTarget not set on control System.Windows.Controls.Button (method ShowInfo). This probably means the control hasn't inherited it from a parent, e.g. because a ContextMenu or Popup sits in the visual tree. You will need so set 's:View.ActionTarget' explicitly. See the wiki section "Actions" for more details.”
Use conductors for navigation, not frames. See https://github.com/canton7/Stylet/wiki/Screens-and-Conductors