This is a migrated thread and some comments may be shown as answers.

ActiveX controls doesn´t work

2 Answers 72 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 25 Sep 2010, 08:34 PM

I would need to use activeX control to open swf files inside application. It works without problems when doesn´t use RadDocking. But when I use RadDocking, activeX control won´t display.

I tried to use another ActiveX cntrols and it doesn´t work always when using RadDocking. Does anybody know please how to solve it?

My sample code:

MainWindow.xaml

<Window xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"       
        x:Class="TelerikDocking.MainWindow"
         
        Title="MainWindow" Height="350" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <telerikDocking:RadDocking Grid.Column="1"
                                   VerticalAlignment="Stretch"
                                   HorizontalAlignment="Stretch"
                                   telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True">
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadDocumentPane Header="Preview" x:Name="pane_preview_"  Title="Preview">
                        <Border x:Name="telerik_border"
                                BorderBrush="Black"
                                Background="Transparent"
                                ClipToBounds="True"
                                BorderThickness="1.5" />
                    </telerikDocking:RadDocumentPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadDocking.DocumentHost>
            </telerikDocking:RadDocking>
         
            <Border x:Name="border" Grid.Column="0" />
    </Grid>
</Window>

MainWindow.xaml.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms.Integration;
using System.IO;
 
namespace TelerikDocking
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            WindowsFormsHost host = new WindowsFormsHost();
            FlashPlayer player = new FlashPlayer();
            player.LoadMovie(Directory.GetCurrentDirectory() + "\\00.swf");
            host.Child = player;
            border.Child = host;
 
            WindowsFormsHost host2 = new WindowsFormsHost();
            FlashPlayer player2 = new FlashPlayer();
            player.LoadMovie(Directory.GetCurrentDirectory() + "\\00.swf");
            host.Child = player2;
            telerik_border.Child = host2; 
        }
    }
}

FlashPlayer.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace TelerikDocking
{
    public partial class FlashPlayer : UserControl
    {
        public FlashPlayer()
        {
            InitializeComponent();
            axShockwaveFlash1.Dock = DockStyle.Fill;
            axShockwaveFlash1.IsAccessible = false;
            axShockwaveFlash1.EmbedMovie = false;
            axShockwaveFlash1.Playing = false;
        }
 
        public void LoadMovie(string strPath)
        {
            axShockwaveFlash1.LoadMovie(0, strPath);           
        }  
    }
}

2 Answers, 1 is accepted

Sort by
0
Pavel
Top achievements
Rank 1
answered on 27 Sep 2010, 04:28 PM
I changed Window on UserControl and set that usercontrol as content of another window and UserControl with FlashPlayer started to display normally surprisingly. So it works already, but only in UserCntrol, and doesn´t work in Window
0
Miroslav Nedyalkov
Telerik team
answered on 30 Sep 2010, 08:15 AM
Hello Pavel,

 Thank you for sharing this work-around! If you could open a support ticket and provide a sample application that reproduces the previously observed problem, this would be very helpful.

All the best,
Miroslav Nedyalkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Docking
Asked by
Pavel
Top achievements
Rank 1
Answers by
Pavel
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or