public StateRestorer(HexBox hexBox, HexBoxState state) { this.hexBox = hexBox; this.state = state; this.hexBox.Loaded += HexBox_Loaded; }