With the following code, the Convert method is being called when one of the DependencyProperties are being updated/changed.
I want the converter to be called only when the button is clicked.
How can I do that?
Here’s the code:
<Button Content="Create Project">
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource MyConverter}" UpdateSourceTrigger="Explicit" Mode="TwoWay">
<Binding Path="Text" ElementName="txtDesc"/>
<Binding Path="Text" ElementName="txtName"/>
<Binding Path="SelectedItem" ElementName="ListBox"/>
<Binding Path="SelectedItem.Language" ElementName="TreeView"/>
</MultiBinding>
</Button.CommandParameter>
</Button>
I think will correct something like this code:
xaml
cs