Click here to Skip to main content
15,922,696 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have tried hard to host an ActiveX control in Flipview but have been unable to achieve desired result. I'm using Windows 7 and Flipview control, as found on codeproject (http://www.codeproject.com/Articles/741026/WPF-FlipView). I'm actually embedding a flash movie into my project, and on swiping the new movie should be loaded. I have also made custom control to wrap AxShockwaveFlash control as folows

<usercontrol x:class="MTC.SIMVA.IC.Controls.WPFFlashControl" xmlns:x="#unknown">
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:fla="clr-namespace:AxShockwaveFlashObjects;assembly=AxInterop.ShockwaveFlashObjects"
mc:Ignorable="d" Loaded="UserControl_Loaded" >
<dockpanel width="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}">
<windowsformshost x:name="flashMovie">
<fla:axshockwaveflash x:name="flashMovie2" xmlns:fla="#unknown">




My view is as follows:
<dl:flipview x:name="flipView" itemssource="{Binding Flows}" selectedindex="0" selectionchanged="flipView_SelectionChanged" xmlns:x="#unknown" xmlns:dl="#unknown">
<dl:flipview.datacontext>
<vm:swipewinviewmodel xmlns:vm="#unknown">

<dl:flipview.itemtemplate>
<datatemplate>
<dockpanel x:name="mainPanel" lastchildfill="True">

<dockpanel x:name="topPanel" dockpanel.dock="Top" horizontalalignment="Left" verticalalignment="Top" removed="#E4E4E4" width="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DockPanel}}}">
<dockpanel lastchildfill="True" height="80">
<textblock text="{Binding Name}" fontfamily="Segoe UI" verticalalignment="Center" block.textalignment="Center" horizontalalignment="Center" textwrapping="Wrap" fontweight="Bold" fontsize="22" margin="200,0,200,0">



<dockpanel x:name="animPanel" removed="LightBlue" visibility="Visible" width="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DockPanel}}}">
<uc:wpfflashcontrol x:name="flashControl" moviesource="{Binding Source}" xmlns:uc="#unknown">








A window is displayed but nothing is shown. However, when I use custom control without FlipView it works fine, so I think there is problem with FlipView Control. Is it possible to use such custom control in datatemplate of FlipView control?

What I have tried:

I have tried almost every possibility.............
Posted
Comments
Sergey Alexandrovich Kryukov 31-May-16 22:14pm    
In principle, you can, but it looks bad: using so obsolete and poor technology as ActiveX in so advanced and modern technology as WPF. Is that ActiveX control is so valuable? Perhaps if you describe what that ActiveX control does, I'll see how it can be done in pure WPF...

Also, you apparently did not "try almost every possibility". But who knows? you did not show what you have tried. Please read carefully:
What have you tried so far?

—SA
Member 812294 9-Jun-16 15:15pm    
I have to show swf file in ActiveX control. We have made many such flows n want to show different flow on swiping

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