- Thread starter
- Admin
- #961
Does anybody how I can combine below 3 values into a Label?
The ExpressionMultiValueConverter does not work, because {0} and {2} are not strings. But because a SlimTvDateFormatConverter is used, I can not add a StringConverter additionally. MPF does not allow usages of multiple converter. Nested MultiBindings are also not possible.
The current solution with a StackPanel including 3 labels is not feasible, because neither TextTrimming nor Scroll="Auto" are possible.
In case {0} and {2} have not only a time, but also a date the total length is too much and overlapping other parts.
The ExpressionMultiValueConverter does not work, because {0} and {2} are not strings. But because a SlimTvDateFormatConverter is used, I can not add a StringConverter additionally. MPF does not allow usages of multiple converter. Nested MultiBindings are also not possible.
XML:
<Label Color="{ThemeResource TextColor}" Scroll="Auto">
<Label.Content>
<MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}+{2}">
<Binding Path="CurrentProgram.StartTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
<Binding Source=" — "/>
<Binding Path="CurrentProgram.EndTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
</MultiBinding>
</Label.Content>
</Label>
The current solution with a StackPanel including 3 labels is not feasible, because neither TextTrimming nor Scroll="Auto" are possible.
In case {0} and {2} have not only a time, but also a date the total length is too much and overlapping other parts.