private void CalculateByteCount() { int byteSize = System.Text.Encoding.GetEncoding("Shift_JIS").GetByteCount(_documentModel.Text); _byteCount = (byteSize / 1024) + "KB(" + byteSize + "バイト)"; OnPropertyChanged("ByteCount"); }