WindowsHostsForm not showing is content

21 posts, 1 answers
  1. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 16 Nov 2011 Link to this post

    Hi,

    in our application, we have multiple DLL (each dll correspond to a module in our application). Actually, I'm converting a WinForm module to WPF and we need to have a WindowsFormsHost control to have a specific control in my form. My new form is a RadWindow and my WindowsHostsForm control doesn't display our specific control in it (see picture).

    If I start a new project and I convert the Window1 class to a RadWindow, I add a WindowsHostsForm into my RadWindow and my specific control into the WindowsFormsHost, at this time, I can see my specific control!!! When I run my new project, a classic Window appear with my RadWindow is inside of it. In my DLL, instead of having my RadWindow inside a Window classic form, I can see my RadWindow directly.


    Here is the XAML and a screenshot:

    <

     

    telerik:RadWindow x:Class="com.christiegrp.Neuron.ClientApplication.DictationForm"

     

     

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

     

     

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

     

     

    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

     

     

    xmlns:helper="clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper"

     

     

    xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"

     

     

    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"

     

     

    Header="DictationForm" Name="Me" WindowState="Maximized" SizeToContent="False" PreviewClosed="Me_PreviewClosed"

     

     

    telerik:PersistenceManager.StorageId="DictationForm">

     

     

     

    <telerik:RadWindow.IconTemplate>

     

     

     

    <DataTemplate>

     

     

     

    <Image Source="Resources/DictationModuleWPF_48x48.png" Height="24" Width="24" Stretch="Fill" Margin="0 2 3 0" />

     

     

     

    </DataTemplate>

     

     

     

    </telerik:RadWindow.IconTemplate>

     

     

     

    <telerik:RadWindow.Resources>

     

     

     

    <ResourceDictionary>

     

     

     

    <helper:LetterFormatWidth x:Key="letterFormatWidth" />

     

     

     

    <ResourceDictionary.MergedDictionaries>

     

     

     

    <ResourceDictionary Source="DictationForm-Fr-Res.xaml"/>

     

     

     

    <ResourceDictionary Source="pack://application:,,,/Resources;component/Neuron-CustomStyles.xaml"/>

     

     

     

    <ResourceDictionary Source="/Telerik.Windows.Controls.Navigation;component/Themes/GenericOfficeBlack.xaml"/>

     

     

     

    </ResourceDictionary.MergedDictionaries>

     

     

     

    </ResourceDictionary>

     

     

     

    </telerik:RadWindow.Resources>

     

     

     

    <Grid Name="gridRoot">

     

     

     

    <Grid.RowDefinitions>

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="*" />

     

     

     

    </Grid.RowDefinitions>

     

     

     

    <!-- The following element is used to trigger an event allowing to replace the language resources before they are used. -->

     

     

     

    <TextBlock Initialized="ReplaceLanguageResources"/>

     

     

     

    <telerikRibbonBar:RadRibbonBar Name="radRibbonBar" Margin="10 10 10 0" telerik:KeyTipService.IsKeyTipsEnabled="True" MinimizeButtonVisibility="Visible" ApplicationName="Neuron" IsMinimized="True" ApplicationButtonImageSource="Resources/Neuron_32x32.png">

     

     

     

    <telerikRibbonBar:RadRibbonBar.Effect>

     

     

     

    <DropShadowEffect />

     

     

     

    </telerikRibbonBar:RadRibbonBar.Effect>

     

     

     

    <telerikRibbonBar:RadRibbonBar.ApplicationMenu>

     

     

     

    <telerikRibbonBar:ApplicationMenu telerik:KeyTipService.AccessText="F">

     

     

     

    <telerikRibbonBar:ApplicationMenu.Content>

     

     

     

    <StackPanel Width="300">

     

     

     

    <telerikRibbonBar:RadGroupHeader Content="Menu" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="1. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="2. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="3. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="4. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="5. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="6. Option..." HorizontalAlignment="Stretch" />

     

     

     

    <telerikRibbonBar:RadRibbonButton Content="7. Option..." HorizontalAlignment="Stretch" />

     

     

     

    </StackPanel>

     

     

     

    </telerikRibbonBar:ApplicationMenu.Content>

     

     

     

    <telerikRibbonBar:ApplicationMenu.FooterContent>

     

     

     

    <StackPanel Height="25" Orientation="Horizontal">

     

     

     

    <telerik:RadButton Width="106" Height="22" Margin="3 0" Click="radButtonQuit_Click">

     

     

     

    <telerik:RadButton.Content>

     

     

     

    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="3 0 5 0">

     

     

     

    <Image Width="16" Height="16" Source="Resources/Exit_32x32.png" />

     

     

     

    <TextBlock Margin="4 0 0 0" VerticalAlignment="Center" Text="{StaticResource Quit}" />

     

     

     

    </StackPanel>

     

     

     

    </telerik:RadButton.Content>

     

     

     

    </telerik:RadButton>

     

     

     

    </StackPanel>

     

     

     

    </telerikRibbonBar:ApplicationMenu.FooterContent>

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="1. Option..." />

     

     

     

    <telerikRibbonBar:Separator />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="2. Option..." />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="3. Option..." />

     

     

     

    <telerikRibbonBar:Separator />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="4. Option..." />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="5. Option..." />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="6. Option..." />

     

     

     

    <telerikRibbonBar:Separator />

     

     

     

    <telerikRibbonBar:RadRibbonButton Text="7. Option..." LargeImage="Resources/Exit_32x32.png" />

     

     

     

    </telerikRibbonBar:ApplicationMenu>

     

     

     

    </telerikRibbonBar:RadRibbonBar.ApplicationMenu>

     

     

     

    <telerikRibbonBar:RadRibbonBar.QuickAccessToolBar>

     

     

     

    <telerikRibbonBar:QuickAccessToolBar>

     

     

     

    <!--

     

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Departments_32x32.png" SnapsToDevicePixels="True"/>

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Billing_32x32.png" SnapsToDevicePixels="True"/>

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Receivables_32x32.png" SnapsToDevicePixels="True"/>

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Reports_32x32.png" SnapsToDevicePixels="True"/>

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Files_32x32.png" SnapsToDevicePixels="True"/>

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Configuration_32x32.png" SnapsToDevicePixels="True"/>

    -->

     

     

    <telerikRibbonBar:RadRibbonButton SmallImage="Resources/Exit_32x32.png" SnapsToDevicePixels="True" Click="radButtonQuit_Click"/>

     

     

     

    </telerikRibbonBar:QuickAccessToolBar>

     

     

     

    </telerikRibbonBar:RadRibbonBar.QuickAccessToolBar>

     

     

     

    </telerikRibbonBar:RadRibbonBar>

     

     

     

    <telerik:RadDocking Grid.Row="1" Margin="10">

     

     

     

    <telerik:RadDocking.Effect>

     

     

     

    <DropShadowEffect />

     

     

     

    </telerik:RadDocking.Effect>

     

     

     

    <telerik:RadDocking.DocumentHost>

     

     

     

    <telerik:RadSplitContainer Name="splitContainerRight" telerik:DockingPanel.InitialSize="{Binding ElementName=webDocuments, Path=ActualHeight, Converter={StaticResource letterFormatWidth}}" Width="{Binding ElementName=webDocuments, Path=ActualHeight, Converter={StaticResource letterFormatWidth}}">

     

     

     

    <telerik:RadPaneGroup>

     

     

     

    <telerik:RadPane Title="{StaticResource ScannedDocs}" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <WebBrowser Name="webDocuments" LoadCompleted="webDocuments_LoadCompleted" />

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    </telerik:RadSplitContainer>

     

     

     

    </telerik:RadDocking.DocumentHost>

     

     

     

    <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical">

     

     

     

    <telerik:RadSplitContainer InitialPosition="DockedRight" Orientation="Horizontal">

     

     

     

    <!-- Controls -->

     

     

     

    <telerik:RadPaneGroup Name="radPaneControls" Height="138" MinHeight="{Binding Height}" MaxHeight="{Binding Height}">

     

     

     

    <telerik:RadPane Title="{StaticResource Controls}" CanDockInDocumentHost="False" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <Grid>

     

     

     

    <Grid.ColumnDefinitions>

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    </Grid.ColumnDefinitions>

     

     

     

    <Grid.RowDefinitions>

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    </Grid.RowDefinitions>

     

     

     

    <helper:NavigationControl Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Name="dnDocuments" TextPrefix="{StaticResource Documents}" NavigationChangedEvent="dnDocuments_NavigationChanged" Margin="5" Buttons="All"/>

     

     

     

    <helper:NavigationControl Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Name="dnExams" TextPrefix="{StaticResource Exams}" NavigationChangedEvent="dnExams_NavigationChanged" Margin="5" Buttons="All"/>

     

     

     

    <CheckBox Grid.Column="0" Grid.Row="2" Name="ckUrgent" Margin="5" Content="{StaticResource Urgent}" />

     

     

     

    <CheckBox Grid.Column="1" Grid.Row="2" Name="ckSign" Margin="5" Content="{StaticResource Sign}" />

     

     

     

    <CheckBox Grid.Column="2" Grid.Row="2" Name="ckOnHold" Margin="5" Content="{StaticResource FilmsPending}" />

     

     

     

    </Grid>

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    <!-- Audio -->

     

     

     

    <telerik:RadPaneGroup>

     

     

     

    <telerik:RadPane Name="radPaneAudio" Height="{Binding ElementName=radPaneControls, Path=Width}" MinHeight="{Binding Height}" MaxHeight="{Binding Height}" Title="{StaticResource Audio}" CanDockInDocumentHost="False" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <!--<telerik:RadButton Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" Content="Alain" />-->

     

     

     

    <WindowsFormsHost Name="RecorderContainer">

     

     

     

    <wf:DataGridView x:Name="dataGridView" Location="0, 0" ColumnHeadersVisible="True" SelectionMode="FullRowSelect" MultiSelect="False" />

     

     

     

    </WindowsFormsHost>

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    </telerik:RadSplitContainer>

     

     

     

    <!-- Panel containing visit infos -->

     

     

     

    <telerik:RadPaneGroup>

     

     

     

    <telerik:RadPane Title="{StaticResource VisitInfos}" CanDockInDocumentHost="False" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <Grid Margin="5">

     

     

     

    <Grid.ColumnDefinitions>

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="*" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    <ColumnDefinition Width="Auto" />

     

     

     

    </Grid.ColumnDefinitions>

     

     

     

    <Grid.RowDefinitions>

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

    <RowDefinition Height="*" />

     

     

     

    <RowDefinition Height="*" />

     

     

     

    </Grid.RowDefinitions>

     

     

     

    <!-- Row #0 -->

     

     

     

    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="0" Grid.Row="0" Name="lPatientMRN" Margin="0 2 2 2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="N/A" />

     

     

     

    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Name="lPatientName" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="N/A" />

     

     

     

    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="3" Grid.Row="0" Name="lGender" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="M" />

     

     

     

    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="4" Grid.Row="0" Name="lPHN" Margin="2" Foreground="Green" FontSize="14" FontWeight="Bold" Content="N/A" />

     

     

     

    <Label BorderThickness="1" BorderBrush="Black" Grid.Column="5" Grid.Row="0" Grid.ColumnSpan="3" Name="lPatientAge" Foreground="Green" Margin="2 2 0 2" FontSize="14" FontWeight="Bold" Content="N/A" />

     

     

     

    <!-- Row #1 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="1" Content="{StaticResource Date}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtVisitDate" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Margin="2" IsEnabled="False" />

     

     

     

    <Label Grid.Column="3" Grid.Row="1" Content="{StaticResource Visit}" HorizontalAlignment="Right" Margin="2" />

     

     

     

    <TextBox Name="txtVisitNumber" Grid.Column="4" Grid.Row="1" Grid.ColumnSpan="3" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    <!-- Row #2 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="2" Content="{StaticResource Exams}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtExams" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="6" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    <!-- Row #3 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="3" Content="{StaticResource RefPhysician}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtRefPhysician" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="5" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    <telerik:RadButton Grid.Column="6" Grid.Row="3" Margin="2 2 0 2" Name="btnPhone" Click="btnPhone_Click">

     

     

     

    <Image Height="18" Width="18" SnapsToDevicePixels="True" Source="Resources/Phone_32x32.png" />

     

     

     

    </telerik:RadButton>

     

     

     

    <!-- Row #4 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="4" Content="{StaticResource Technician}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtTech" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="6" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    <!-- Row #5 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="5" Content="{StaticResource Comments}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtComments" Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="6" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    <!-- Row #6 -->

     

     

     

    <Label Grid.Column="0" Grid.Row="6" Content="{StaticResource Note}" HorizontalAlignment="Right" Margin="0 2 2 2" />

     

     

     

    <TextBox Name="txtNote" Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="6" Margin="2 2 0 2" IsEnabled="False" />

     

     

     

    </Grid>

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    <!-- Old reports -->

     

     

     

    <telerik:RadPaneGroup>

     

     

     

    <telerik:RadPane Title="{StaticResource OldReports}" CanDockInDocumentHost="False" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <Grid Margin="5">

     

     

     

    <Grid.RowDefinitions>

     

     

     

    <RowDefinition Height="*" />

     

     

     

    <RowDefinition Height="*" />

     

     

     

    </Grid.RowDefinitions>

     

     

     

    <telerik:RadGridView Name="gridHistorical" Margin="0 0 0 2" Grid.Row="0" IsSynchronizedWithCurrentItem="True" Height="Auto" Width="Auto" IsReadOnly="True" SelectionMode="Single" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" ShowGroupPanel="False" SelectionUnit="FullRow">

     

     

     

    <telerik:RadGridView.Columns>

     

     

     

    <telerik:GridViewDataColumn Header="{StaticResource Date}" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False" />

     

     

     

    <telerik:GridViewDataColumn Header="{StaticResource Exams}" HeaderTextAlignment="Left" TextAlignment="Left" IsFilterable="False" />

     

     

     

    <telerik:GridViewDataColumn Header="{StaticResource Accession}" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False" />

     

     

     

    <telerik:GridViewDataColumn Header="{StaticResource Status}" HeaderTextAlignment="Center" TextAlignment="Center" IsFilterable="False" />

     

     

     

    </telerik:RadGridView.Columns>

     

     

     

    </telerik:RadGridView>

     

     

     

    <TextBox Name="rtbPreviousReport" Margin="0 2 0 0" Grid.Row="1" Text="" IsEnabled="False" />

     

     

     

    </Grid>

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    <!-- Current report -->

     

     

     

    <telerik:RadPaneGroup>

     

     

     

    <telerik:RadPane Title="{StaticResource CurrentReport}" CanDockInDocumentHost="False" CanFloat="{Binding ElementName=Me, Path=IsDockable}" CanUserPin="{Binding ElementName=Me, Path=IsDockable}" CanUserClose="False">

     

     

     

    <TextBox Name="rtbCurrentReport" Margin="5" Text="" IsReadOnly="False" />

     

     

     

    </telerik:RadPane>

     

     

     

    </telerik:RadPaneGroup>

     

     

     

    </telerik:RadSplitContainer>

     

     

     

    </telerik:RadDocking>

     

     

     

    </Grid>

     

    </

     

    telerik:RadWindow>

     

  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 21 Nov 2011 Link to this post

    Hi Oliver,

    The RadWindow control is displaying in a WPF window with its AllowTransparency property set to true which disables rendering of any non-wpf content inside the RadWindow control. To disable this you need to set the RadWindowInteropHelper.AllowTransparency property to false.

    Hope this helps.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 21 Nov 2011 Link to this post

    Hi,

    the class RadWindowInteropHelper is available with build 2011.2.712.35???

    Also, if I use this control in a docking window, when my window become floating, does my control should stay visible???

    Thank's
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Nov 2011 Link to this post

    Hi Oliver,

    This class was added as a new feature of the RadWindow control in the 2011 Q3 release. It is not available in the 2011 Q2 build.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 22 Nov 2011 Link to this post

    Hi,

    I just upgraded to version 2011.3.1116.35 and the AllowTransparency member is not available from the RadWindowInteropHelper class :(

    Actually my module is a DLL not an application so no instance of my App class are create.

    Thank's
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Nov 2011 Link to this post

    Hi Oliver,

    As the AllowTransparency property is actually an attached property there is no member with this name. The members are AllowTrasparencyProperty (the dependency property field), SetAllowTrasparency, GetAllowTrasparency (methods from the attached property pattern). All of these members are static.

    To set the property in XAML you need to add the telerik:RadWindowInteropHelper.AllowTrasparency="true" attribute to the RadWindow control and to set it in C# you need to use the RadWindowInteropHelper.SetAllowTransparency(window, false) static method.

    Hope this helps.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 22 Nov 2011 Link to this post

    Hi,

    I added the line to my xaml and here is the error I had:
    Error 11 The attachable property 'AllowTransparency' was not found in type 'RadWindowInteropHelper'. D:\Developpement\GestX.Courant\RisGC\Client\DictationModuleWPF\DictationForm.xaml 8 132 DictationModuleWPF
    Error 19 The property 'RadWindowInteropHelper.AllowTransparency' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 8 Position 132. D:\Developpement\GestX.Courant\RisGC\Client\DictationModuleWPF\DictationForm.xaml 8 132 DictationModuleWPF

    Hre is the header of my xaml:

    <

     

    telerik:RadWindow x:Class="com.christiegrp.Neuron.ClientApplication.DictationForm"

     

     

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

     

     

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

     

     

    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

     

     

    xmlns:helper="clr-namespace:com.christiegrp.Neuron.ClientApplication;assembly=ClientHelper"

     

     

    xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"

     

     

    Header="DictationForm" Name="Me" WindowState="Maximized"

     

     

    telerik:PersistenceManager.StorageId="DictationForm" PreviewClosed="Me_PreviewClosed" Loaded="Me_Loaded" SizeToContent="False" telerik:RadWindowInteropHelper.AllowTransparency="true">

    Keep in mind that my DLL (no instance of App is created) using Telerik docking control. So in one of my Pane, I have a WindowsFormsHost which contian a my control. When the pane is dock, I can see my control but mhen my Pane become floating, the control dissapear.

    Thank's

  9. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Nov 2011 Link to this post

    Hello Oliver,

    I prepared a sample project that demonstrates how to achieve what you need. I'm attaching it to this post.

    Hope this helps.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 23 Nov 2011 Link to this post

    Hi Miroslav,

    I'm using VS2008 not VS2010 so your demo desn't work :( I change the version number from 11.00 to10.00 into the SLN file so after that, I can load your project into VS2008 :)

    So now, when I try to compile your project, I have the following problems:

    Error 1 Assembly 'DockWithTrasparentToolWindows' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. D:\xxx\DockWithNonTrasparentToolWindows\MainWindow.xaml 5 15 DockWithNonTrasparentToolWindows

    Error 2 The type 'local:NonTrasparentWindowsGeneratedItemsFactory' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\xxx\DockWithNonTrasparentToolWindows\MainWindow.xaml 10 6 DockWithNonTrasparentToolWindows

    Error 3 The type 'local:WinFormsUserControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\xxx\DockWithNonTrasparentToolWindows\MainWindow.xaml 16 9 DockWithNonTrasparentToolWindows

    Error 4 Property 'GeneratedItemsFactory' does not support values of type 'NonTrasparentWindowsGeneratedItemsFactory'. D:\xxx\DockWithNonTrasparentToolWindows\MainWindow.xaml 10 5 DockWithNonTrasparentToolWindows

    Error 5 The name 'InitializeComponent' does not exist in the current context D:\xxx\DockWithNonTrasparentToolWindows\MainWindow.xaml.cs 24 4 DockWithNonTrasparentToolWindows

    In my main DLL project what I did is the following, when the PaneState change, I try to get is parent ToolWindow and SetAllowTransparency to them but I fall in an exception:

     

    private void RadDocking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e)

     

    {

     

    if (e.OriginalSource is RadPane && (RadPane)e.OriginalSource == panAudio)

     

    {

     

    RadPane pane = e.OriginalSource as RadPane;

     

     

    if (pane != null && pane.IsFloating)

     

    {

     

    ToolWindow win = pane.GetParentToolWindow();

     

     

    if (win != null && win.Tag == null)

     

    {

    win.Tag = 1;

     

    RadWindowInteropHelper.SetAllowTransparency(win, false);

     

    }

    }

     

  11. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 23 Nov 2011 Link to this post

    Hi Miroslav,

    I solve it accept for one thing, when I start dragging my control into a floating state, I start seing multiple black squares on my screen (glitch behaviour). When I release my mouse button, the screen become normal.

    Thank's
  12. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 28 Nov 2011 Link to this post

    Hello Oliver,

    We reproduced the problem on our side and thank you for reporting us this bug. It seems this happens only on the first drag. We will investigate the cause for this issue and we will fix it in one of our future releases. You can track this progress and vote for it in our Public Issue Tracking System (PITS) here - http://www.telerik.com/support/pits.aspx#/public/silverlight/8633


    Greetings,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. Arnstein
    Arnstein avatar
    36 posts
    Member since:
    Oct 2012

    Posted 07 Mar 2012 Link to this post

    Hi,
    I'm setting the AllowTransparency property to false in the override of CreateToolWindow(). I've got a mixture of winforms and wpf usercontrols in the radpanes. When the ToolWindow is not transparent it behaves a bit flickery, so I'd like to set this property only on winforms where it's necessary. Is there any way to get a hold on the RadPane which will be the content of the newly created toolwindow?

    Best regards
    Arnstein 
  14. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 08 Mar 2012 Link to this post

    Hello Arnstein,

    What you need is not supported as the ToolWindows are not created for a particular pane so the knowledge which pane will be hosted is not provided in the GeneratedItemsFactory.

    Regards,

    Miroslav Nedyalkov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  15. Oliver
    Oliver avatar
    263 posts
    Member since:
    Feb 2011

    Posted 18 Oct 2012 Link to this post

    Hi Guys,

    it's been a long time without any news from you  about : http://www.telerik.com/support/pits.aspx#/public/silverlight/8633.

    Thank's
  16. George
    Admin
    George avatar
    1332 posts

    Posted 24 Oct 2012 Link to this post

    Hello Oliver,

    This issue seems as a bug in the WPF rendering and we haven't schedule a fix at this time. Our future development includes reworking some parts of the RadDocking control in order to avoid this glitch, but we cannot say in what time frame it will be done.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  17. LittleDragon
    LittleDragon avatar
    18 posts
    Member since:
    Apr 2013

    Posted 22 Apr 2013 Link to this post

    im using vs 2008 and i need to host

    WindowsFormsHost in RadWindow


    so i have to use WindowInteropHelper.AllowTransparency to false    method

    this method are not in old version  so how can i use this method in VS 2008  ?
  18. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Apr 2013 Link to this post

    Hello,

    The last version which includes WPF 3.5 dlls is 2012.2.607.35 and it includes this feature.

    Hope this helps.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  19. LittleDragon
    LittleDragon avatar
    18 posts
    Member since:
    Apr 2013

    Posted 23 Apr 2013 Link to this post

    hi  Miroslav

    i  have use RadControls for WPF Q3 2011 SP1 that method is include and its ok

    but when i run the project main layout is not fit to screen size(running smallwindow)  and its when to left size on window

    i remove new telerik DLL and add again old DLL and run the project then main layout running fine \

    whts wrong with Q3 2011 SP1  ???  plz help
  20. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Apr 2013 Link to this post

    Hello,

    Could you please try the version I pointed as it is the most recent one which includes the .NET 3.5 assemblies? As it is almost one year newer there should be a lot of fixes included in it.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  21. LittleDragon
    LittleDragon avatar
    18 posts
    Member since:
    Apr 2013

    Posted 24 Apr 2013 Link to this post

    hi  Miroslav

    i got the solution
    property SizeToContent is set to false it will be working as expected
  22. Donya
    Donya avatar
    1 posts
    Member since:
    Apr 2014

    Posted 02 Apr 2014 Link to this post

      RadWindowInteropHelper.SetAllowTransparency(MYRADWINDOW false);
     
Back to Top
UI for WPF is Visual Studio 2017 Ready