Kippachu
❔ Need help with WPF Prism app
Hello,
Here is the link to the relevant parts of the code: https://www.onlinegdb.com/DAaTMMPEu2
I am developing a WPF app using Prism. The main view is split into two halves, with two separate modules. On the left side, there is a module displaying a data entry form (which can be switched using the navigation drawer). On the right side, I have created a Preview Text Module that displays a FlowDocument loaded in a PreviewTextService.
The idea is that, within my form view models, I load the text I want to display in the PreviewTextService (inside a Dictionary that I convert to a FlowDocument using a converter). Some values are static, while others are linked to property values (properties bound to textboxes inside the form). This way, when I load the form, the default text is displayed in the Preview Text Module. As I input values into the form, the text in the Preview Text Module is automatically updated without regenerating the entire text. Instead, it updates the value linked to the property within the PreviewTextService dictionary.
Additionally, by using the dictionary key, I can perform other manipulations. For example, when a user focuses on a textbox, I can signal to the PreviewTextService that this property is focused, and it will automatically change the background to yellow in the preview text RichTextBox. The same behavior applies for validation errors, changing the foreground to red.
My problem is that I would like to change the way I am registering properties inside the FormsViewModel. Currently, for every property inside FormsViewModel.Data, I have to register their events in the constructor:
5 replies
❔ WPF Date entry Forms MVVM
Hello, I don't understand in WPF when I should use MVVM and when I shouldn't.
For example, i'm loading a data entry forms into a region that i've hard coded in XAML :
Would it be better to use an ItemsControl and define the elements in ViewModel ? Thanks in advance
2 replies
❔ WPF Framework and components
Hello, my question is simple, if you had to make an app in C# with WPF for your job with a navigation drawer, that is easy to maintain alone, what framework and components would you use ?
Let me explain, I've made a start using Syncfusion, it gives me a Spreadsheet viewer control (I must have a Spreadsheet viewer control) but I find it kinda slow, for example when you click on the hamburger button of the navigation drawer it's kinda laggy...
For the framework i'm using Prism WPF, but do you know better frameworks ?
Thanks in advance for your answers ^^
2 replies