Ask about the dynamic display of the button you tapped after tapping Button.
Assume that an xaml file has the following Button tags:
<Button
Clicked="TheButtonTapped"
Image="sample.png"
WidthRequest="256"
HeightRequest="256"
Opacity="0.0"
VerticalOptions="Center"/>
When you run the button tap ("TheButtonTapped") you can click this button as follows:
I want to show it dynamically.
JQuery has an example implementation, so it's easy to imagine, but the C# version is
I'm in trouble because I couldn't find it.
If you know anyone, please let me know.
If you're looking for animation, Xamarin.Forms has animation features, so you can do it with them.
<Button
Text = "Button 1"
Clicked="Button1_Clicked"/>
<Button
x —Name="Button 2"
Text = "Button 2"
Clicked="Button2_Clicked"/>
To run the desired animation on Button2
when there are two buttons (Button1
and Button2
) as shown above and Button1
is pressed:
volatile bool_button2 Enabled = true;
async void Button1_Clicked (object sender, System.EventArgse)
{
_button2Enabled=false;
// Button2.IsEnabled=false; doesn't it look appropriate because the button turns into an inactive color?
// Animation starts: fadeout over 5 seconds (reduces Opacity from '1.0' to '0.0')
Button2.Opacity=1.0;
wait Button 2. FadeTo (0.0, 5000, Easing. Linear);
_button2Enabled=true;
// Button2.IsEnabled = true;
}
void Button2_Clicked (object sender, System.EventArgse)
{
If(!_button2Enabled)//Button2.Locked with flag if IsEnabled is not available
return;
}
The button should be locked using Button2.IsEnabled=false
, but this may cause the button to change to inactive color, which may cause discomfort in animation.In that case, you must have your own flag and achieve the lock as shown in the code above.
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
578 Understanding How to Configure Google API Key
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
576 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.