-
Notifications
You must be signed in to change notification settings - Fork 24
Home
This tutorial teaches you the basics of WPF. Many students have the bad habit of viewing this as an exercise they're supposed to make, a randomly imposed obstacle that keeps then from starting work on the actual project that will be graded. As a consequence, they try to get through the instructions as quickly as they are able to without taking the time to understand what they're doing.
It is imperative that you see this exercise as a useful source of information. Take your time to actually read what you copy-pasted. Check that your interpretation is correct by experimenting: make small changes and verify that they do what you expected to. If they don't, don't ignore it but investigate or ask the lecturers about it. If you follow this advice, making the final project will be a much smoother experience.
Note: while following this tutorial, you will be continuously asked to update your code. This is generally left as an exercise to you, but often you will be shown which exact changes need to be made in the form of a diff:
Some existing code
- Line to be removed
+ Line to be added
Deleting lines is easy, and many of you will want to copy-paste lines that are to be added. While we advice against this, as you will probably overlook many details, we can't force you to manually transcribe the code. If, despite our warning, you still want to copy-paste code, here's how you get rid of the little pluses at the beginning of each line: you can "block-select" them using your mouse while keeping the alt
-key pressed.
- Setting up the git repository
- First steps
- Layout
- Bindings
- Refactoring
- MVVM
- Cells
- Commands
- Reusable view components
If you're stuck somewhere, we'll be happy to help you out. Normally, you should ask for help during lab sessions. In case this is not possible (say, a worldwide virus outbreak), you can try to contact us by e-mail.
In order to help you out, however, we do need access to your code. Please don't bother sending random pieces of code, or worse, screenshots of your code. When trying to find a mistake, we generally do not stare at your code, we compile it and check for compiler errors. If there are none, we run and debug it. In order to be able to do that, we need your entire project.
Do not send us your project as a zip. Instead, use git.
Follow these steps:
- On GitHub:
- Create a new empty repository.
- The name of the repository doesn't matter, but it makes the most sense to call it
TemperatureConverter
. - To reiterate: make sure the repo you create is empty, otherwise you'll have trouble pushing later.
- On your local machine:
- Open a shell in your project's directory.
- Register your own GitHub repo as a new remote named
upstream
:Replacegit remote add upstream URL
URL
by the URL of your GitHub repo. - Push all branches at once.
git push --all -u upstream
If you need to push your changes again later, omit the -u
:
git push --all upstream
To pull changes from all branches:
git pull --all upstream