Hi there,
I #m getting the following error:
System.Windows.Data Error: 40 : BindingExpression path error: 'IconStretch' property not found on 'object' ''ContentPresenter' (Name='LargeIconContent')'. BindingExpression:Path=IconStretch; DataItem='ContentPresenter' (Name='LargeIconContent'); target element is 'Image' (Name=''); target property is 'Stretch' (type 'Stretch')
within this
<syncfusion:RibbonToggleButton
Command="{Binding ShowThirdSetCommand}"
IsCheckable="True"
Label="3.-Set"
LargeIcon="{iconPacks:MaterialImage Kind=HomeFloor3}"
IconStretch="UniformToFill"
SizeMode="Large" />
and as well in this code
<syncfusion:RibbonToggleButton
Command="{Binding ShowAllRallysCommand}"
IsCheckable="True"
IsChecked="True"
Label="All Rallies"
LargeIcon="{iconPacks:MaterialImage Kind=HomeFloorA}"
SizeMode="Large" />
What can I do to avoid this error
best regards Jörg
Hi Jorg Ahmann,
We are unable to reproduce the reported issue from our end. Could you please share the following details? It will help us to provide better solution asap.
Regards,
Karthick Arjunan
Hey Karthick Arjunan,
thanks for your fast answer!
The Image is there and everything seems working. The problem seems the iconPacks, which are the mahapps iconPacks. They do not have a IconStretch Property. I solved it by using the IconTemplate with a Staticressource:
IconTemplate="{StaticResource All}"
And with a DataTemplate in the Ressources:
<DataTemplate x:Key="All">
<Grid Width="24" Height="24">
<Path
Data="M12,3L2,12H5V20H19V12H22L12,3M11,8H13A2,2 0 0,1 15,10V18H13V15H11V18H9V10C9,8.89 9.9,8 11,8M11,10V13H13V10H11Z"
Fill="#000000"
Stretch="Fill" />
</Grid>
</DataTemplate>
It's more work, because I have to convert each Icon into a xaml file and store it in the ressources.
best regards
Jörg
Hi Jorg Ahmann,
We are glad that the reported issue has been resolved. Hence, we consider the reported issue has been solved. Please get in touch with us if you require any further assistance.
Regards,
Karthick Arjunan