Hi Enkhbold,
try following demo.
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<StackPanel>
<Button Content="Create datatable on SQL Server" Command="{Binding Cmd}" CommandParameter="Create"/>
<Button Content="Insert encrypted xml to datatable" Command="{Binding Cmd}" CommandParameter="Insert"/>
<Button Content="Read from datatable and encrypt" Command="{Binding Cmd}" CommandParameter="Load"/>
<Button Content="Test encrypt - decrypt" Command="{Binding Cmd}" CommandParameter="Test"/>
<TextBlock Text="{Binding Info}"/>
</StackPanel>
--------------------------------------------------------------------------
The forum software deny show whole code. I will prepare upload.
Sorry, in this buggy forum include link is prohibited, see pictures:
You can find demo in Github under https://github.com/fips1950/EnDeCrypt_Demo_EnkhboldMunkhbold-5136