Pergunta

I am trying to load a swf file as background for my WPF window. For this I have used a WinformHost and I load the swf movie in the Winform host using the plugin AxShockwaveFlashObjects.

<Grid>
    <WindowsFormsHost Name="wfh">
        <ax:AxShockwaveFlash x:Name="axFlash"/>
    </WindowsFormsHost>
</Grid>

Till here the application works fine. However when I add my other controls(buttons,textblocks etc) to the Grid, they dont show. All I see is just the movie. Any pointers please.

Foi útil?

Solução

This is actually expected since the WPF elements are all rendered within a single HWND (that of the WPF Window in this case) and therefore are below the WindowsFormsHost (or any other HwndHost). This is discussed here in MS' documentation and also here.

In theory this will be supported by some new functionality being added to .NET 4.5 - via the IsRedirected property of the HwndHost. This is discussed in some of the preview documentation for 4.5 here.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top