public MatchedWaybills(BaseScreen screen, NotifyValue <SentOrderLine> line, NotifyValue <bool> isSentSelected) { CurrentWaybillLine = new NotifyValue <WaybillLine>(); WaybillLines = new NotifyValue <List <WaybillLine> >(); WaybillDetailsVisibility = new NotifyValue <Visibility>(() => { if (!isSentSelected) { return(Visibility.Collapsed); } if (WaybillLines.Value == null || WaybillLines.Value.Count == 0) { return(Visibility.Hidden); } return(Visibility.Visible); }, isSentSelected, WaybillLines); EmptyLabelVisibility = new NotifyValue <Visibility>(() => { if (!isSentSelected) { return(Visibility.Collapsed); } if (WaybillLines.Value != null && WaybillLines.Value.Count > 0) { return(Visibility.Hidden); } return(Visibility.Visible); }, isSentSelected, WaybillLines); line.Throttle(Consts.ScrollLoadTimeout, screen.UiScheduler) .SelectMany(v => screen.RxQuery(s => LoadMatchedWaybill(v, s))) .Subscribe(WaybillLines, screen.CloseCancellation.Token); }