C
C#2y 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
LPeter19972y ago
It's fine when you run your program, right?
POQDavid
POQDavid2y ago
Yes
LPeter1997
LPeter19972y ago
The preview for WPF apps is nutoriously bad
POQDavid
POQDavid2y ago
perfectly fine even theme changes when i change it in the settings
LPeter1997
LPeter19972y ago
And can break on any nontrivial view Hence the $rulesofwpf
MODiX
MODiX2y 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
LPeter19972y ago
Simply avoid the designer
POQDavid
POQDavid2y ago
oh wow ok Also what do you think about how I did my whole xaml
LPeter1997
LPeter19972y 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
POQDavid2y ago
Oh ok will do 🙂 ty