I wouldn't use a masked edit box for this - they are really only usefull for fixed input format, not flexible ones as you need.
Instead, I would use a standard TextBox and a regex to validate it:
^(?<first>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<second>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<third>2[0-4]\d|25[0-5]|[01]?\d\d?)\.(?<fourth>2[0-4]\d|25[0-5]|[01]?\d\d?)$</fourth></third></second></first>