✅ How To Get Notification Of When User Has Scrolled Down To End - Avalonia
in my view, I have the above code. It works fine for scrolling down to view the information. I'm going to be putting two buttons on this screen. Accept and Decline. I want to set the Accept button up to where it's disabled until the user has scrolled all the way down on the TextBlock. Does anyone have any ideas on how to do this? Thanks.
4 Replies
Make an attached property
Then check the scroll offset when changed, if at bottom then you can call the callback
ok ty
I looked through the properties of the TextBlock at https://reference.avaloniaui.net/api/Avalonia.Controls/TextBlock/#Properties and I don't see a property that would give me what I'm wanting
well the ScrollViewer not the TextBlock. let me go look at that instead
Look up attached properties
oh wow. ok. that's a lot
small side question. I'm building a ToS screen for my application and it has two buttons. Agree and Decline. They are created like this:
Two things. 1) I have no idea what I can put inside of the
okEnabled
function so that it returns a true value and 2) Instead of having okEnabled
is there a way I can make the button enabled by default? I have tried putting IsEnabled="True"
on the button itself, and that doesn't work
when they click the agree button, it just returns and updated user like this