Can't solve PropertyPath: Type 'ItemCollection' does not contain a property named 'Count'
Hey everyone,
I try to bind the Items.Count of a ListBox to the Maximum and the Height of a Slider. The way I did it works perfectly in a regular WPF project but fails with Noesis.
To me, it looks like that Count is not an exposed property as it should be comparing both documentation entries. Is it just me failing or am I right with my assumption?
https://www.noesisengine.com/docs/Gui.C ... ction.html
https://learn.microsoft.com/en-us/dotne ... esktop-7.0
I try to bind the Items.Count of a ListBox to the Maximum and the Height of a Slider. The way I did it works perfectly in a regular WPF project but fails with Noesis.
To me, it looks like that Count is not an exposed property as it should be comparing both documentation entries. Is it just me failing or am I right with my assumption?
https://www.noesisengine.com/docs/Gui.C ... ction.html
https://learn.microsoft.com/en-us/dotne ... esktop-7.0
Code: Select all
<ListBox x:Name="EpisodeList" ItemsSource="{Binding Episodes}" SelectionChanged="OnEpisodeSelectionChanged"/>
<Slider x:Name="EpisodeSlider" Maximum="{Binding ElementName=EpisodeList, Path=Items.Count, Converter={StaticResource ConverterSubtract}, ConverterParameter=1, Mode=OneWay}" Minimum="0" SmallChange="1" IsSnapToTickEnabled="True" Height="{Binding ElementName=EpisodeList, Path=Items.Count, Converter={StaticResource ConverterMultiply}, ConverterParameter=25, Mode=OneWay}" Width="50" Orientation="Vertical" />
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Can't solve PropertyPath: Type 'ItemCollection' does not contain a property named 'Count'
This is a bug, we are not exposing the Count property of the ItemCollection in the reflection.
Could you please report it in our bugtracker?
In the meantime you can workaround it by binding to the Episodes.Count property instead:
Could you please report it in our bugtracker?
In the meantime you can workaround it by binding to the Episodes.Count property instead:
Code: Select all
Maximum="{Binding Episodes.Count, Converter={StaticResource ConverterSubtract}, ConverterParameter=1, Mode=OneWay}"
Re: Can't solve PropertyPath: Type 'ItemCollection' does not contain a property named 'Count'
Bugticket is created: https://www.noesisengine.com/bugs/view.php?id=2471
The workaround seems to work. Thank you.
The workaround seems to work. Thank you.
Who is online
Users browsing this forum: Semrush [Bot] and 68 guests