Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF - Mirroring content to another window

WPF - Mirroring content to another window

Scheduled Pinned Locked Moved WPF
csharpwpftutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kel_
    wrote on last edited by
    #1

    Hello everyone, For small research project of my AI programme, I'm building a visualization for a multi-screen application, and 2 zones of which must be mirrored. So basically: - On one side I have a WPF layout with controls, data, images and animations happeling - This content should be replicated on another screen (simply another Window) Do you have any ideas how to achieve this? Something that could grab a frame and replicate it, like a texture brush maybe? Thank you in advance for your answers! Best regards, Kel


    -- Everything is possible, even the impossible! ^_^

    I 1 Reply Last reply
    0
    • K Kel_

      Hello everyone, For small research project of my AI programme, I'm building a visualization for a multi-screen application, and 2 zones of which must be mirrored. So basically: - On one side I have a WPF layout with controls, data, images and animations happeling - This content should be replicated on another screen (simply another Window) Do you have any ideas how to achieve this? Something that could grab a frame and replicate it, like a texture brush maybe? Thank you in advance for your answers! Best regards, Kel


      -- Everything is possible, even the impossible! ^_^

      I Offline
      I Offline
      Insincere Dave
      wrote on last edited by
      #2

      Use a VisualBrush.

      K 1 Reply Last reply
      0
      • I Insincere Dave

        Use a VisualBrush.

        K Offline
        K Offline
        Kel_
        wrote on last edited by
        #3

        Thank you for your reply! Ok so I figured out how to do the mirroring within same Window, something like this:

        <Canvas x:Name="RendererCanvas" Background="White" Grid.Column="1" Grid.Row="1" >
        <v:RenderView x:Name="Renderer" Width="300" Height="300" />
        </Canvas>

            <Grid Grid.Column="0" Grid.Row="1" Background="DarkGray">
                <Viewbox Stretch="Uniform" DataContext="{Binding ElementName=Renderer}">
                    <Grid Width="{Binding Width}" Height="{Binding Height}">
                        <Grid.Background>
                            <VisualBrush Stretch="Uniform" Visual="{Binding}" />
                        </Grid.Background>
                    </Grid>
                </Viewbox>
            </Grid>
        

        Now, would it be possible to do exact same thing but in 2 different windows? So 2 XAML files one binding another. Maybe with some static fields?

        -- Just think in 10 dimensions!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups