animate-text | animated-text 文字动画 | Data Manipulation library
kandi X-RAY | animate-text Summary
kandi X-RAY | animate-text Summary
animated-text 文字动画
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Try to retrieve a new module .
- Check if passed element is a simple selector
- Animate text .
- show a warning warning
- Defines properties on an object .
- Call a method
- return a function
- inject functions
- The actual module
- Functions
animate-text Key Features
animate-text Examples and Code Snippets
Community Discussions
Trending Discussions on animate-text
QUESTION
Hi I'm trying to figure out how to animate a TextBlock when it's property updates. New to WinUI3/XAML but I've found https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/how-to-apply-animations-to-text which gives a lot of examples that work, but they all use TextBlock.Loaded. I've tried changing it to TargetUpdated, SourceUpdated, FrameWork.x, Binding.x etc, all crash so I'm not sure what to put in there. Lot's of example on the net, but ones I can find seem to be either WPF or UWP which still crash.
My code which is pretty much same as MS's examples sans binding:
...ANSWER
Answered 2022-Apr-11 at 12:38Trying to "avoid code-behind" in cases like this is usually a mistake. View-related logic should be implemented in the view (or control) using a programming language. This does not break the MVVM pattern in any way as the pattern is not about trying to eliminate code from the views in the first place.
Using a markup language such as XAML to implement farily advanced UI logic is generally an antipattern and in the case of UWP and WinUI 3, it's not even possible to use triggers to accomplish what you want.
To quote the ReactiveUI docs, "C# is a much more expressive, more concise language than XAML, and while it may be possible for you to create an entire complex view without writing any code, the result will be an unmaintainable, difficult to read mess."
My suggestion would be to implement the animation programmtically, either directly in the code-behind of the view or as part of an attached behaviour or custom control.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install animate-text
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page