C
C#3y ago
POQDavid

MaterialDesignThemes Doesn't load on IDE

Hey guys in my project https://github.com/poqdavid/PotatoWall I am using http://materialdesigninxaml.net/ but on the IDE it doesn't load my default theme its all white like in the image I was wondering what I am doing wrong and how i can fix it?
10 Replies
LPeter1997
LPeter19973y ago
It's fine when you run your program, right?
POQDavid
POQDavidOP3y ago
Yes
LPeter1997
LPeter19973y ago
The preview for WPF apps is nutoriously bad
POQDavid
POQDavidOP3y ago
perfectly fine even theme changes when i change it in the settings
LPeter1997
LPeter19973y ago
And can break on any nontrivial view Hence the $rulesofwpf
MODiX
MODiX3y 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
LPeter1997
LPeter19973y ago
Simply avoid the designer
POQDavid
POQDavidOP3y ago
oh wow ok Also what do you think about how I did my whole xaml
LPeter1997
LPeter19973y ago
I honestly can't tell as I'm not a big UI user. Maybe you can get valuable feedback in #code-review tho
POQDavid
POQDavidOP3y ago
Oh ok will do 🙂 ty
Want results from more Discord servers?
Add your server