private void ToggleFillButton_Click(object sender, RoutedEventArgs e) { if (_isFilled) { OutputRichTextBox.Replace(SolidShapes, OutlineShapes); } else { OutputRichTextBox.Replace(OutlineShapes, SolidShapes); } _isFilled ^= true; }