0

I am developing a UI that simply runs multiple background processes, no user interaction; just visual display of what the processes are doing. The logical/user-interface hierarchy is:

+ one Shell UI, with list view of (many):
\---+ BackgroundProcess container(s), each of which is composed of:
    \---+ a. Info about FIRST Half of BackgroundProcess instance, namely:
    |   \---+ Current State
    |   \---+ ErrorInLogFile?
    |   \---+ ProgressBar      
    \---+ b. Info about SECOND Half of BackgroundProcess instance, namely:
        \---+ Current State
        \---+ ErrorInLogFile?
        \---+ ProgressBar

Focus on the fact that I have a list of user-controls, each of which is composed of two user-controls. My issue is that updates to the Current State, isErrorInLogFile, and Progress are not being shown, which to me says that somehow the way in which I am structuring my xaml is not sufficient for Caliburn to activate the second-level user-controls.

The background process container, called FullAppCard, in the file FullAppCard.xaml, has the following ViewModel class signature:

public class FullAppCardViewModel : PropertyChangedBase { ... }

//FullAppCard.xaml:
<UserControl x:Class="DocuFaxbackUI.Views.FullAppCardView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:DocuFaxbackUI.Views"
             mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            ...
        </Grid.RowDefinitions>
        <local:AppCardView x:Name="Part1" />
        <local:AppCardView x:Name="Part2" />
    </Grid>
</UserControl>

and AppCardView, relating to the first and second 'half' of the whole process:

public class AppCardViewModel : PropertyChangedBase { ... }

<UserControl x:Class="DocuFaxbackUI.Views.AppCardView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:cal="http://www.caliburnproject.org"
             mc:Ignorable="d">
    <Grid HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            ...
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
           ...
        </Grid.RowDefinitions>
        <TextBlock Name="Status"/>
        <Label Name="Error" cal:Message.Attach="[Event MouseUp] = [Action OpenLogFile];"/>
        <ProgressBar Value="{Binding Path=CurrentProgress}" Maximum="{Binding Path=MaximumProgress}" />
    </Grid>
</UserControl>

The ShellViewModel which conducts the list of FullAppCardViewModels inherits from Conductor<PropertyChangedBase>.Collection.AllActive. Despite this setup, it would seem that I still cannot get changes in the AppCardView to register with the ShellViewModel-level UI marshalling thread.

iiian
  • 393
  • 1
  • 5
  • 17
  • `Conductor.Collection.AllActive` walk me through thought process for `PropertyChangedBase` (strictly does `INotifyPropertyChanged` events) instead of something like `IScreen or Screen` since well.. AllActive would expect a screen life cycle of sorts. – mvermef Jan 27 '18 at 06:52
  • note: Screen has PropertyChangedBase included... – mvermef Jan 27 '18 at 07:04

0 Answers0