Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7893579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:10:07+00:00 2026-06-03T07:10:07+00:00

I need to create a small GUI application to manually invoke some driver commands.

  • 0

I need to create a small GUI application to manually invoke some driver commands.
In total, there are about 40 commands and some of them with additional arguments.

The request is, that all commands should be on a single page. Apart from this, there are no requirements and since it is just a testing environment, the user experience is only a minor concern.

When I start doing it the “regular” way and just add buttons and input elements for the arguments, I end up with a really cluttered UI. It also feels plain wrong to do something like

<Button Command="{Binding DriverCommand} CommandParameter=1/> 

For all 40 commands

So my question is, what would be a good way to make lots of commands with varying parameters available?
I would prefer an MVVM way, simply because I want to further learn this pattern.
An implementation where I have my commands (as enums?) in my viewmodel and can just bind it to a control in the view, would be ideal. I could then reuse the UI with different drivers (which is something that is very probable).

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:10:08+00:00Added an answer on June 3, 2026 at 7:10 am

    You could go with something similar to the following:

    View-models:

    public class CommandDashboardViewModel
    {
        public ObservableCollection<DriverCommandViewModel> DriverCommands { get; set; }
    }
    
    public class DriverCommandViewModel
    {
        // all of these properties have to implement INPC
        public string CommandText { get; set; }
        public ICommand Command { get; set; }
        public object CommandParameter { get; set; }
    }
    

    View:

    <!-- the DataContext of this view is instance of CommandDashboardViewModel -->
    <ItemsControl ItemsSource="{Binding DriverCommands}">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <Button Content={Binding CommandText} Command={Binding Command} CommandParameter={Binding CommandParameter}/> 
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
    

    I’ve putted it together of the top of my head so my apologies for any syntax errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a patching routine for my application, it's really small but
I'm studying Prism and need to create a small demo app. I have some
in my WPF application I sometimes need to create a small helper window and
I am going to need to create a small windows application that stores basic
I have a need to create a small pop up information box when a
I need to create small thumbnails of HTML elements. I first thought using CSS
Suppose I need to create my own small DSL that would use Python to
i have used eclipse, android sdk and phonegap to create a small application. I
I need to create a small app or script to install a .NET assembly
I need to create a very small ListView. Each row could have a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.