简体   繁体   中英

Control Panel like application in C#

I would like to create some basic application that visually looks like Window's control panel:

Control Panel in Windows 7

  1. Large icons with titles below for each extra form.
  2. Double clicking the icon results opening some extra form.
  3. You can navigate using keyboard arrows through the icons.

The question is if there are some common way to do it? Well I think I can do it by adjusting style of application and adding the necessary behavior, but maybe there is some other way?

Moreover I remember that there was a way to create such things in Windows 95/98 by editing the folder's configuration file that had ".htm" extansion (if i'm not mistaken). I tried to google the method, but it looks like I use wrong keywords...

Using Spy++ I see that the Control Panel application uses a tree control and tree view but you probably do not need a hierarchical view. Another possibility is what is called a list view (like the right side of Windows Explorer) but I am not sure what the equivalent in WPF is.

If you mean something similar to this:

在此处输入图片说明

You can bind an ObservableCollection of objects that represent a "page" to a ListBox, which you'd probably want to wrap in a UserControl. We'll call that UserControl PageSelector.

If you wanted to include an address/search bar, you'd want to create additional UserControls, all of which you could wrap in another UserControl, which we'll call ControlPanel.

If you aren't already familiar with DependencyProperties and bindings, get to know them well. They make communicating between UserControls a breeze.

Further, you can create a UserControl called PageViewer, which would handle displaying the clicked page. Then whenever a page in PageSelector is clicked, you can hide the PageSelector, show the PageViewer and set the DataContext of the PageViewer to the clicked page. Note, the clicked page in PageSelector can be accessed by PageViewer using bindings.

Hope this leads you somewhere!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM