C
C#

help

MaterialDesignThemes Doesn't load on IDE

PPOQDavid10/1/2022
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?
LLPeter199710/1/2022
It's fine when you run your program, right?
PPOQDavid10/1/2022
Yes
LLPeter199710/1/2022
The preview for WPF apps is nutoriously bad
PPOQDavid10/1/2022
perfectly fine even theme changes when i change it in the settings
LLPeter199710/1/2022
And can break on any nontrivial view Hence the $rulesofwpf
MMODiX10/1/2022
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
LLPeter199710/1/2022
Simply avoid the designer
PPOQDavid10/1/2022
oh wow ok Also what do you think about how I did my whole xaml
LLPeter199710/1/2022
I honestly can't tell as I'm not a big UI user. Maybe you can get valuable feedback in #code-review tho
PPOQDavid10/1/2022
Oh ok will do 🙂 ty

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
while-loopthe while-loop won't stop if the item int is 2 or -2 and idk why https://codeshare.io/logxOjWhy is my code not thread save?``` await Task.WhenAll(tasks).ContinueWith(task => Selection()); ``` is in a loop tasks is a list ofrar librarywhat is the best library/nuget out there to list and extract the content of a rar file? it would be Does DbSet.FirstOrDefaultAsync return a tracked entity?I have the following code below ```var existingCreator = await _dbContext.ContentCreators.FirstOrDefNeed help with a simple programim trying to code a progra mthat converts minutes to hours. but the module thingy is doing the oppsiRounding? (Urgent) [Answered]Whats the function in `Math` that does this?Windows Interactive Logon [Answered]I have been tasked with writing a program that connects to a remote computer and unlocks the workstaNullability in an assertion checking method [Answered]I have a piece of code that checks for nulls in another method, then proceeds to use the values as iNeed some helpExample: For instance, I would enter the number 5 in the textbox if I needed 5 small, but I'm tryingDllImport TroublesHello there. I'm running on linux. I'm trying to load symbols from a library named `libxyz.so`. I haHelp [Answered]I want to use the result of the function before in the function below, and I cant add more args in tHow do I use recursive methods and constructions together? [Answered]i don't know what is wrongCompare keys of dictionaries [Answered]Anyone know a good way to compare whether two dictionaries have the exact same keys? `SequenceEqual`Update SQL database rows with a dictionary [Answered]I have the following SQL server table: ``` id | name | url -------------- 1 | John | 2 | Jane | 3 List SerialisationI'm trying to add multiple items to a list by serializing and deserializing to add more items then rCan't get items to be added to updateI can't seem to get the "update" List filled.. I have this Json data <https://hastebin.com/bazadowesLogging EF-core exceptionsHi, I'm doing some refactor for logging db exceptions. What's good practice when logging db exceptioIDENTITY_INSERT Error on table in which I am not even trying to insert?I am getting this Error: `SqlException: Cannot insert explicit value for identity column in table 'UStupid JSON QuestionGood Morning. I want ```c "news": [ { "sophoraId": "ukraine-annexion-kritik-101", ``` aCheck if user already voted this post or comment [Answered]I want to fill the like/dislike buttons with color if they are already voted by the user. Which one