MODiX
MODiX
CC#
Created by Mekiaqu on 7/24/2024 in #help
Visual Studio C# WinForms, a question for better performance.
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
47 replies
CC#
Created by biskit on 7/24/2024 in #help
Building a console app for a uni assignment and struggling
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
57 replies
CC#
Created by Frite on 7/24/2024 in #help
Monogame, Effect can't find parrameter.
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
16 replies
CC#
Created by Frite on 7/24/2024 in #help
Monogame, Effect can't find parrameter.
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
16 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
Stop asking about XorShift, just use System.Random and probably also Random.Shared.Next.... quote from the article bellow:
Despite the similar-sounding name, the “Xoroshiro/Xoshiro” algorithms approaches the problem differently from the preceding “Xorshift” family.
Note: Versions of the Xoshiro number generator are used in the System.Random class in the forthcoming .NET 6.x onwards
https://blogs.siliconorchid.com/post/coding-inspiration/randomness-in-dotnet
52 replies
CC#
Created by zorous on 7/23/2024 in #help
✅ how do i fix this?
If you have no further questions, please use /close to mark the forum thread as answered
6 replies
CC#
Created by zorous on 7/23/2024 in #help
✅ how do i fix this?
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
6 replies
CC#
Created by RobertGee on 7/23/2024 in #help
✅ Rider Program does not contain Static Main
The possible signatures for Main are
public static void Main() { }
public static int Main() { }
public static void Main(string[] args) { }
public static int Main(string[] args) { }
public static async Task Main() { }
public static async Task<int> Main() { }
public static async Task Main(string[] args) { }
public static async Task<int> Main(string[] args) { }
public static void Main() { }
public static int Main() { }
public static void Main(string[] args) { }
public static int Main(string[] args) { }
public static async Task Main() { }
public static async Task<int> Main() { }
public static async Task Main(string[] args) { }
public static async Task<int> Main(string[] args) { }
public is not required (can be any accessibility). Top-level statements are compiled into a Main method and will use an appropriate signature depending on the body. https://docs.microsoft.com/en-US/dotnet/csharp/fundamentals/program-structure/main-command-line
66 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
52 replies
CC#
Created by MechWarrior99 on 7/23/2024 in #help
✅ Faster & thread safe random number generator?
52 replies
CC#
Created by ThunderSpark91 on 7/23/2024 in #help
IConfiguration using the json string/Data Model directly, instead of saving to a temporary file?
24 replies
CC#
Created by suki on 7/22/2024 in #help
need help with program (.exe)
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
73 replies
CC#
Created by ah_Yes_NO_Tee on 7/23/2024 in #help
Implement a program where you can add name and age into a seperate list
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
8 replies
CC#
Created by Mathis NSM on 7/22/2024 in #help
All compiler errors have to be fixed before you can enter playmode!
14 replies
CC#
Created by suki on 7/22/2024 in #help
need help with program (.exe)
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
73 replies
CC#
Created by suki on 7/22/2024 in #help
need help with program (.exe)
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
73 replies
CC#
Created by edgarka_ on 7/21/2024 in #help
Avalonia ListBox pass selected DataTemplate
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
17 replies
CC#
Created by chx777 on 7/20/2024 in #help
Using the C# dev kit(not the dotnet cli) how to disable top level statements within vscode?
There are two ways to get Rider for free: Being a student: https://www.jetbrains.com/community/education/#students Using it for an OSS project: https://www.jetbrains.com/community/opensource/#support
30 replies