✅ .NET MAUI Layout

I am trying to create a password field with the show icon to the right of the password field, when i run the application using a windows machine, it seems fine, but then when i try to run it on an android device i get the below
No description
11 Replies
Buddy
Buddy10mo ago
$rulesofwpf
MODiX
MODiX10mo ago
Rules of WPF:

❌ Avoid the WPF Designer to eliminate a category of confusing bugs
❌ Don't rely on Margin as the primary tool for layouts
❌ Avoid writing UserControls or subclassing to extend a default control -- use Behaviors instead (Microsoft.Xaml.Behaviors.Wpf)

✅ Write XAML by hand and autoformat with "Ctrl K,D" or XAML Styler
✅ Rely upon XAML Hot Reload to design your app's UI at runtime
✅ Use layout controls (Grid, DockPanel, etc) to support proper resizing
✅ Use data binding to eliminate glue code and state synchronization issues
✅ Use collection controls and DataTemplate to dynamically create lists of controls
✅ Learn MVVM to create maintainable apps
✅ Use the Dispatcher to update controls from non-UI threads
✅ WPF's default controls can be easily modernized via $wpfuilibs
✅ Include relevant XAML, code-behind, and ViewModel code for questions when possible
Rules of WPF:

❌ Avoid the WPF Designer to eliminate a category of confusing bugs
❌ Don't rely on Margin as the primary tool for layouts
❌ Avoid writing UserControls or subclassing to extend a default control -- use Behaviors instead (Microsoft.Xaml.Behaviors.Wpf)

✅ Write XAML by hand and autoformat with "Ctrl K,D" or XAML Styler
✅ Rely upon XAML Hot Reload to design your app's UI at runtime
✅ Use layout controls (Grid, DockPanel, etc) to support proper resizing
✅ Use data binding to eliminate glue code and state synchronization issues
✅ Use collection controls and DataTemplate to dynamically create lists of controls
✅ Learn MVVM to create maintainable apps
✅ Use the Dispatcher to update controls from non-UI threads
✅ WPF's default controls can be easily modernized via $wpfuilibs
✅ Include relevant XAML, code-behind, and ViewModel code for questions when possible
Buddy
Buddy10mo ago
Do not use Margin for layout, use a StackPanel (or what the hell it is called in MAUI)
willCodeforFood
willCodeforFoodOP10mo ago
okay, lemme try this
Buddy
Buddy10mo ago
Margin is the spacing between elements It should not be used for layouting
SG97
SG9710mo ago
you may want to use row-/columndefinitions on your Grid as it seems to behave the same as in WPF
Zubair
Zubair10mo ago
in entry use horizental option fill
willCodeforFood
willCodeforFoodOP10mo ago
Thanks this worked. Do you also know how I can enable hot reload for an Android Emulator? currently when I make changes, i have to rebuild my entire solution
Zubair
Zubair10mo ago
Hot reload enable by default. Just make source in preference hot reload enabled
willCodeforFood
willCodeforFoodOP10mo ago
Thanks, I think I can close this question now
MODiX
MODiX10mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server