c# - How to Pass multiple parameter in Multivalue Converter Over WPF DataTrigger -
i'm having 4 int
property proone
, protwo
, prothree
, profour
i have implement boolean logic ((proone == protwo) || (prothree == profour))
in multivalue converter namely visibilitycheckconverter
. based on logic multivalue converter visibilitycheckconverter
returns true
or false
.
now need pass 4 properties converter on datatrigger, based on value, have change buttons visibility visible
kindly assist me how write datatrigger using multivalue converter multiple parameter
sample piece of xaml code:
<controltemplate.triggers> <datatrigger property="{binding , converter={staticresource visibilitycheckconverter,converterparameter=proone protwo prothree profour}}" value="true"> <setter targetname="button" property="visibility" value="visible" /> </datatrigger> </controltemplate.triggers>
you can this
<style.triggers> <datatrigger value="true"> <datatrigger.binding> <multibinding converter="{staticresource visibilitycheckconverter}"> <binding path="proone" /> <binding path="protwo" /> <binding path="prothree" /> <binding path="profour" /> </multibinding> </datatrigger.binding> <setter targetname="button" property="visibility" value="visible" /> </datatrigger> </style.triggers>
Comments
Post a Comment