Answer the question
In order to leave comments, you need to log in
Binding StringFormat (WPF) not working?
We need binding with displaying not just the value, but also our own text.
Found this option:
<DockPanel>
<Label Content="{Binding StringFormat=Выбрано {0} единиц, ElementName=slider1, Path=Value}" DockPanel.Dock="Top"/>
<Slider Name="slider1" Value="50" Maximum="100" IsSnapToTickEnabled="True" DockPanel.Dock="Top"/>
</DockPanel>
Выбрано \{0\} единиц
Выбрано {}{0} единиц
Answer the question
In order to leave comments, you need to log in
<Label
Content="{Binding ElementName=slider1, Path=Value}"
ContentStringFormat="{}Выбрано {0} единиц"
DockPanel.Dock="Top"
/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question