Relative Content

Tag Archive for c#wpfdata-binding

What is the right way to populate a dropdown with options [None, 1, 2, …10]?

Should I define an Enum for my dropdown that displays options [None, 1, 2, ….10] in my wpf application?. The question is not whether “Can I”? but whether it is correct to define an Enum and bind to it for displaying options [None, 1, 2.. 10]. If you don’t think this would be the right way of doing it, what do you think would be the better way?

How to select only specific field in the dropdown from wpf form using c#?

I have a condition that checks if compartment(truck-empty) and purpose(“Leaving-Finished Product”) these are my only required fields must when selected should along with topseal and bottomseal do a validation and ignore other compartments for validation, Now the issue now all compartments are seem to be handling this logic and want to prevent it from happening. How can i achieve this?

WPF – Customizing your ingame controls

I’m making a local multiplayer game in c# WPF. I’m struggling with customizeable user controls(key inputs). The game itself is a basic Bomberman. For 2 – 3 players. Ecach player can move up, down, left, right and place down a bomb. In the View layer I made a ControlSettingPage. I also set its DataContext to my ViewModel instance, so the bindings should work properly.
Here is the View: