I love WPF

"jamais sans son interface"

I love WPF

"jamais sans son interface"

Day: 30 août 2020

ToolTips with StringFormat when it’s don’t work

If you want bind a tooltip with value and have a StringFormat of a slider for exemple… the StringFormat is not apply (for tag or another property it’s the same behavior) For solve it use this code <Slider x:Name= »slider » HorizontalAlignment= »Left » Background= »LightCoral » Height= »29″ Margin= »37,162,0,0″ TickFrequency= »1″ Tag= »{Binding Value, RelativeSource={RelativeSource Self}, StringFormat=N2} » VerticalAlignment= »Top » Value= »0″ Width= »350″> <Slider.ToolTip> <ToolTip DataContext= »{Binding […]

Retour en haut