0
我有一個項目列表 - 當選擇一個,我想滑動應用程序了。這是我到目前爲止有:切換BottomAppBar可見性不起作用?
<AppBar IsOpen="{Binding BookIsSelected}">
<Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<AppBarButton Icon="Remove" Label="Remove Book" Command="{Binding RemoveBook}" Visibility="{Binding BookIsSelected, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel>
</Grid>
</AppBar>
在書的gridview的,我有這樣的:
SelectedItem ="{Binding SelectedBook, Mode = TwoWay}" />
BookIsSelected:
private bool _bookSelected;
public bool BookIsSelected {
get {
return _bookSelected;
}
set {
SetProperty(ref _bookSelected, value);
}
}
我能看到的get/set擊中時我選擇了一本書,但appbar從不飛出。我究竟做錯了什麼?
你在哪裏觸發'BookIsSelected'屬性的'PropertyChanged'事件? – Amer
@Amer,我想象那是在'SetProperty'方法中...但是如果不是的話,那麼你就是解決方案。 – Sheridan