Does your Current property actually compile? I'm not sure of what you are trying to achieve in the setter.
To control the width from the viewmodel, you would need to
a. create a Width property that notifies the view when the value changes
b. bind the Width property of the control to your viewmodel variable.
ViewModel
public class StatBarViewModel : AnimatedViewModelBase
{
private int MAXIMUMWIDTHFROMVIEW;
private int _max;
public StatBarViewModel(int WIDTH, int maxValue)
{
_max = maxValue;
MAXIMUMWIDTHFROMVIEW = WIDTH;
}
private int _current;
public int Current
{
get { return _current; }
set
{
// makes sure value is never greater than max value
_current = (value > _max) ? _max : value;
NotifyOfPropertyChange("Current");
}
}
}
View
...
<ContentControl x:Name="HPBar" Width="{Binding Path=Current}"/>
...