The Right Way to Conditional Render in .NET MAUI

  Рет қаралды 5,021

SingletonSean

SingletonSean

Күн бұрын

Пікірлер
@SingletonSean
@SingletonSean Жыл бұрын
I forgot to mention that the performance part of this video was heavily inspired by this blog post by XamGirl! xamgirl.com/stop-doing-isvisibletrue-false-to-show-hide-views-in-runtime-in-xamarin-forms
@abhaynath5833
@abhaynath5833 11 ай бұрын
Your WPF tutorials are like treasure ! Can you please make a tutorial about right way to do localization in WPF ? Thanks for the amazing content.
@teriyakov
@teriyakov 8 ай бұрын
This is great. I managed to implement it with the mvvm pattern (using the community toolkit) by binding the condition to a boolean property on the viewmodel which I set on page load. Works perfectly. Thanks again!
@FranciscoZhou-c7b
@FranciscoZhou-c7b 5 ай бұрын
Hi, I am really appreciate you delivery this content to solve what's the dependant property is since this problem prevents me away from any xaml app.
@wowojune9184
@wowojune9184 6 ай бұрын
The most best explanation of "Bindable Property".
@7m0xd
@7m0xd 11 ай бұрын
This is amazing, I never knew about this issue and Im actually facing it, I have two CollectionViews and Im showing only one of them but in terms of performance Im sure this will be an issue. but with your solution its gonna avoid that. Thank you bro and I hope to see more MAUI Content.
@SingletonSean
@SingletonSean 11 ай бұрын
That's awesome, hope this solution goes well!!
@paschalasobirionwu1183
@paschalasobirionwu1183 11 ай бұрын
hey random question could this be extrapolated to a three way validation i.e., if condition == 1 => display view1 else if condition == 2 => display view2 else => display view3 btw great video I can see this becoming a game changer in the MAUI community
@krccmsitp2884
@krccmsitp2884 11 ай бұрын
Really nice solution and explanation.
@DornerWorksMobile
@DornerWorksMobile 4 ай бұрын
Could this be done with an enum value like a switch?
@AliakseiPlashchanski
@AliakseiPlashchanski Жыл бұрын
Does the same approach work in WPF?
@SingletonSean
@SingletonSean Жыл бұрын
Yep, good question! I think you would just need to use a UserControl instead.
@ignatiusjreilly1287
@ignatiusjreilly1287 11 ай бұрын
I believe that using Visibility="Collapsed" in WPF is enough. The object is removed from the visual tree and has minimum impact.
@TheTigerus
@TheTigerus 11 ай бұрын
4:38 If class is not ambiguous between if condition?
@SingletonSean
@SingletonSean 11 ай бұрын
Nope! Because the casing is different (if vs If)
@TheTigerus
@TheTigerus 11 ай бұрын
@@SingletonSean recently I spent 30 min fixing a bug in my code. Bug was "ID" instead of "Id". Even if it's not ambigous for code itself, naming class "If" is dangerous. But it's only example so ¯\_(ツ)_/¯
@GautamJainTheActor
@GautamJainTheActor 3 ай бұрын
Thanks. This works great. Performance has improved. I called by class RenderThis instead of If. If you think someone out there has introduced a better way of doing this since you posted this video, please do let us know.
@mariocamspam72
@mariocamspam72 11 ай бұрын
You're conflating terminology somewhat: the label isn't being rendered. The problem comes from it still being in the logical tree and thus loaded like other controls (as stated with the listview example)
@SingletonSean
@SingletonSean 11 ай бұрын
True! I think that is a better way to describe it
@ndev92
@ndev92 7 ай бұрын
Good video but should it be this hard to do something like this?
@megaman2016
@megaman2016 11 ай бұрын
Very nice
@NickSteffen
@NickSteffen 10 ай бұрын
You know you are working in a ui framework when you need mountains of boiler plate to accomplish basic functionality… still nice solution.
Accidentally Building the Greatest .NET MAUI Meta-Framework
10:20
SingletonSean
Рет қаралды 3 М.
The Right Way To Return API Errors in .NET
10:40
Nick Chapsas
Рет қаралды 68 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
The Right Way To Build Async APIs in ASP.NET Core
20:12
Milan Jovanović
Рет қаралды 25 М.
Using a Xamarin.Forms Renderer in .NET MAUI Without Code Changes!
17:59
Starting .NET MAUI Development in 2024 - What You Need To Know
35:18
James Montemagno
Рет қаралды 84 М.
.NET MAUI Page Types | DotNet MAUI Navigation | .NET MAUI pages
21:25
Coding Droplets
Рет қаралды 31 М.
What is the MVVM pattern, What benefits does MVVM have?
22:38
James Montemagno
Рет қаралды 103 М.
Dependency Injection with .NET MAUI Explained! Full Beginner's Guide
19:18
Python Logging: How to Write Logs Like a Pro!
11:02
ArjanCodes
Рет қаралды 185 М.
Highly Customizable Popups for .NET MAUI with Mopups
18:20
Gerald Versluis
Рет қаралды 33 М.