First use of ShellListView and ShellTreeListBox

Shell for WPF Forum

Posted 2 months ago by Peter Treier
Version: 19.1.0682
Avatar

Good Morning all

It's the first time that I use the Shell Components...

I use the Shelltreebox in a Grid on a User Control - basically the same layout as shown in the sample. I got this Error for both components:


A value of type 'ShellListView' cannot be added to a collection or dictionary of type 'UIElementCollection'.

The Build is successful an the Control seems to be working.

Any Ideas - maybe missing Reference?
Peter

Comments (3)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Peter,

I'm sorry you're having trouble.  Can you give more information about this error...  Do you mean you only see it in the VS designer or elsewhere?  Can you post as simple of XAML as possible to make it occur?  Thanks!


Actipro Software Support

Posted 2 months ago by Peter Treier
Avatar

Well, here is a simplyfied version of my code

<Window>
	<Grid x:Name="BaseGrid">
	
		<shell:ShellTreeListBox x:Name="treeListBox" Grid.Row="0" RootSpecialFolderKind="Computer" />

		<GridSplitter Grid.Row="0" Grid.Column="1" Width="6" ResizeBehavior="PreviousAndNext" />

		<shell:ShellListView Grid.Row="0" Grid.Column="2" x:Name="listView"
									 RootShellFolder="{Binding ElementName=treeListBox, Path=SelectedShellObject}"
									 CanIncludeLinks="False" CanUseThumbnails="False" />
		<Grid.DataContext>
			<viewModel:MainVM />
		</Grid.DataContext>
	</Grid>

	<Window.DataContext>
		<viewModel:MainVM />
	</Window.DataContext>

</Window>

[Modified 2 months ago]

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Peter,

Could you let us know where exactly you are seeing the problem?  I loaded your Grid into a new Window in a new WPF project and added the Grid's ColumnDefinitions and removed the DataContext since I don't have that VM.  That being said, the app ran fine, and the VS 2019 designer opened without any issues either.  I could see both controls in the designer.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.