I made a app using App Map (grate tool) but I need co nv er my co0de from XAML to C# t make some validations
How I can call this on C# button:
<Button Grid.Row="8" Grid.Column="1" Text="Acceder" Command="{Binding Path=NavigateAbsoluteCommand}" CommandParameter="/MasterDetail/NavigationPage/InicioPage" CornerRadius="5" />
Thanks in advance
Alejandro Castrejon
Hello Alejandro,
I’m not certain, but from your most recent update I am under the impression that what you are looking to do in C# is the validation prior to firing the Command. Please let me know if this is not the case.
Perhaps something you could do is modify the execute code for the “NavigateAbsoluteCommand” Command that you are binding such that it does this validation prior to any of the other actions that the command is doing, and prevent the command from doing those other actions if your validation fails?
Another alternative is to not use a binding for the Command at all and instead handle the Clicked event of the Button, as commands will fire on click of the Button. In that event, you could perform your validation first and then execute the code that is happening within the command or create a new instance of that command and call its Execute method.
Please let me know if you have any other questions or concerns on this matter.
First at all Thanks for taking the time to read mi question.
I make my model with infragistics APP MAP and I have my login view and I want to execute some C# code to validate the access before to navigate to main view, in the XAML generated code i have a button with this code:
Command="{Binding Path=NavigateAbsoluteCommand}" CommandParameter="/MasterDetail/NavigationPage/InicioPage"
My question its:
how can I make the same on C#?
I am a little unsure of what exactly you are asking and what you are looking to have converted to C#? Are you looking to build that entire Button object in C# or are you looking to be able to fire it in C#? Can you please provide some more information on this matter?