The problem is not the index of the XAxes collection. The reason you are not able to assign to the Maximum property of the Range is because, as the compiler said, it is read-only. This is how you would change the range of the first x-axis in the XAxes collection:
// Assuming that you want to set minimum to -10 and maximum to 0.
this.gui_graphMessung.XAxes[0].Range = new Range(-10, 0);
The reason for this is to prevent you from accidentally setting the minimum to be greater than the maximum. If the Maximum and Minimum properties were writable, then in order to ensure that the Minimum value was less than the Maximum value, you would have to set the Minimum value first before you set the Maximum value. For example, if the Range is currently 1,
10 and you wanted to change this to -10, 0, then you would have to set the Minimum value to -10 before you set the Maximum value to 0. Otherwise, if you tried to set the Maximum value 0 before the Minimum value, then the Range would become 1, 0 and this would violate the minimum must always be less than the maximum rule. To prevent this we require that to set the Range of the axis, you create a new instance of Range and specify both the minimum and maximum value at the same time.
Abhishek Ghuwalewala
Measurement Studio R & D
National Instruments