canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
995 stars 144 forks source link

About button binding #299

Closed mimimiaomiao1 closed 3 years ago

mimimiaomiao1 commented 3 years ago

View.ActionTarget not set on control System.Windows.Controls.Button: (method Login). 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.”

mimimiaomiao1 commented 3 years ago

`<Button Content="{Binding SwitchLoginPageContent,Mode=TwoWay}" Command="{s:Action Login}" The main page can be used. Sub pages cannot be used

`