microsoft / microsoft/WPF-Samples

Refactor ViewModels, Views to reduce redundancy

Open
#627 0 comments 0 reactions 1 assignee View on GitHub

@dipeshmsft is already working on this.

Since Aug 26, 2024.

:construction: work in progress WPF Gallery
Dominant language
C#
Stars
5.7k
Forks
3.3k
Avg merge
12d 8h
Merged PRs (30d)
2

Description

Description

The ask here is to reduce redundancy in the application code. Here are the few areas that can be made better :

  • Reduce redundancy in ViewModels : Most of the ViewModels, contain at least two members, title and description. Above that, the group pages consist of one more item - navigation cards / items. We can make a BasePageViewModel and BaseGroupPageViewModel which will consist of these common members and rest of the view models can inherit these and then provide there own members required for the pages
  • Reduce redundancy in Views : As of now, although we have seperate pages for each group, however the view for each of these pages is exactly the same. Moreover, the structure of their view models are also the same. Find a way to combine all of these into a single page with different data populated
  • Remove excess imports : Currently all the C# files import the required namespaces, and are not utilizing the global using feature of C#. Add the common namespaces in Usings.cs and remove the respective namespaces from the files.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.