Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

runtime error "The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals."

$
0
0

Hello

I'm working on a Visual Studio 2010 project (recently converted to VS2010 and .NET 4.0, windows 7 x64) in WinForms which has a WPF User Control in it (with an elementhost). Everything worked fine, until I wanted to replace the ListView i commented out with a grid (DevExpress) below. I'm getting the following error, even when I don't configure anything on the grid:

 "The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals."

I'm posting this here because I don't think this issue is related to devexpress, I'm thinking it's more of an ElementHost problem. The grid shows itself perfectly at design time.

 

 

 

<!--<ListView x:Name="listWerkOrders" ItemsSource="{Binding WerkOrders}" Width="200" Height="300" VerticalAlignment="Top" DisplayMemberPath="Naam" dragdrop:DragDropHelper.IsDragSource="true" dragdrop:DragDropHelper.DragDropTemplate="{StaticResource dragTemplate}" SelectionMode="Single" SelectionChanged="ListView_SelectionChanged">

</ListView>-->

 

 

 

 

<dxg:GridControl x:Name="gridWerkOrders" DataSource="{Binding WerkOrders}">

 

 

 

<dxg:GridControl.View>

 

 

 

<dxg:TableView NavigationStyle="Row" x:Name="gridView" AutoWidth="True" />

 

 

 

</dxg:GridControl.View>

 

 

 

<dxg:GridControl.Columns>

 

 

 

 

<dxg:GridColumn Header="Werkorder" FieldName="Naam" />

 

 

 

</dxg:GridControl.Columns>

</dxg:GridControl>

Any ideas?

Thanks in advance

Joachim


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>