Тёмный

The Right Way to Conditional Render in .NET MAUI 

SingletonSean
Подписаться 23 тыс.
Просмотров 4,5 тыс.
50% 1

Опубликовано:

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@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
@GautamJainTheActor
@GautamJainTheActor 18 дней назад
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.
@abhaynath5833
@abhaynath5833 8 месяцев назад
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 5 месяцев назад
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!
@wowojune9184
@wowojune9184 4 месяца назад
The most best explanation of "Bindable Property".
@FranciscoZhou-c7b
@FranciscoZhou-c7b 3 месяца назад
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.
@7m0xd
@7m0xd 8 месяцев назад
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 8 месяцев назад
That's awesome, hope this solution goes well!!
@paschalasobirionwu1183
@paschalasobirionwu1183 8 месяцев назад
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 8 месяцев назад
Really nice solution and explanation.
@DornerWorksMobile
@DornerWorksMobile Месяц назад
Could this be done with an enum value like a switch?
@mariocamspam72
@mariocamspam72 8 месяцев назад
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 8 месяцев назад
True! I think that is a better way to describe it
@amarul92
@amarul92 4 месяца назад
Good video but should it be this hard to do something like this?
@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 8 месяцев назад
I believe that using Visibility="Collapsed" in WPF is enough. The object is removed from the visual tree and has minimum impact.
@NickSteffen
@NickSteffen 7 месяцев назад
You know you are working in a ui framework when you need mountains of boiler plate to accomplish basic functionality… still nice solution.
@TheTigerus
@TheTigerus 8 месяцев назад
4:38 If class is not ambiguous between if condition?
@SingletonSean
@SingletonSean 8 месяцев назад
Nope! Because the casing is different (if vs If)
@TheTigerus
@TheTigerus 8 месяцев назад
@@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 ¯\_(ツ)_/¯
@megaman2016
@megaman2016 8 месяцев назад
Very nice
@GnomeEU
@GnomeEU 8 месяцев назад
That's way too much code and logic in your xaml. Your xaml should be lightweight. How bloated would this be if you have hundred fields. You can't reuse this as well in other forms without copying large chunks of mess.
@JansthcirlU
@JansthcirlU 8 месяцев назад
How would you keep your xaml lightweight if you had hundreds of fields?
@SingletonSean
@SingletonSean 8 месяцев назад
Curious, did you see the part of the video with the custom component? I think that would address the concern here
@GnomeEU
@GnomeEU 8 месяцев назад
@@SingletonSean was it in the last 2 min? :D
Далее
What is the MVVM pattern, What benefits does MVVM have?
22:38
ЧТО Я ПОСТРОИЛ 11? | CLEX #shorts
1:00
Просмотров 588 тыс.
.NET and C# are in trouble. Here is what I'd do.
10:57
98% Cloud Cost Saved By Writing Our Own Database
21:45
Просмотров 391 тыс.
Is LEARNING WPF still WORTH it in 2023?
10:59
Просмотров 54 тыс.
.NET MAUI Signature Pad Complete Guide
15:06
Просмотров 7 тыс.
Reusable, Custom Controls in .Net Maui!
14:09
Просмотров 13 тыс.