Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am writing an application which will allow users to select from a series of maps on a touchscreen display, and then the maps will also display on a larger wall-mounted screen. Users will be able to pan/zoom/rotate around the maps and I would like the wall-mounted screen to show those changes in sync with the touchscreen.

What is a good way to approach managing the two displays?

Currently, I have the application set up in MVVM format and am using Caliburn.Micro.

Each map is in its own UserControl and they are activated in a ContentControl on my ShellView using Conductor and ActivateItem in the ShellViewModel. I would like to have the Active Item also be displayed in a separate Window (on the wall-mounted screen).

Here is the code so far:

ShellView.xaml:

<Grid>
       <!--The Content control shows which MapView is currently active-->
       <ContentControl x:Name="ActiveItem"/>
           <StackPanel>
               <TextBlock Text="Select a map.">
               <ComboBox>
                   <Button x:Name="LoadMap1">Map1</Button>
                   <Button x:Name="LoadMap2">Map2</Button>
                   <Button x:Name="LoadMap3">Map3</Button>
               </ComboBox>
           </StackPanel>
   </Grid>



ShellViewModel.cs
public class ShellViewModel : Conductor<object>
{
    public ShellViewModel()
    {

    }

    public void LoadMap1()
    {
        ActivateItem(new MapOneViewModel());
    }

    public void LoadMap2()
    {
        ActivateItem(new MapTwoViewModel());
    }

    public void LoadMap3()
    {
        ActivateItem(new MapThreeViewModel());
    }
}


I do not know if this is the best way to set this up, but it works well for loading the maps on the ShellView. I really just need to show the same thing in another window for the wall-mounted Display

Any help appreciated, Thanks!

What I have tried:

I have tried using a VisualBrush but don't know if I can bind it across two Windows.
Posted
Updated 18-Apr-19 13:50pm

1 solution

You can show as many non-modal windows as you want; and have any window call methods in another window.

If that isn't enough, you run multiple instances of your app; using remote automation or whatever else comes to mind.

Windows can be dragged to any screen. Windows 10 scales well, IMO.
 
Share this answer
 
Comments
indiapalealex 24-Apr-19 14:35pm    
Thanks for your reply! Can a non-modal window show the same instance as another window? Like as users make changes to the user interface, I want the other window to show those changes in-sync with the first window during runtime.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900