private void UpdateCode() { var icon = TextBoxHelper.GetIcon(TbCustom); var watermark = TextBoxHelper.GetWatermark(TbCustom); var cornerRadius = SldCornerRadius.Value; var isClearButtonVisible = TextBoxHelper.GetIsClearButtonVisible(TbCustom); TbCode.Text = "<TextBox Height=\"30\"" + $"\nWidth=\"{TbCustom.Width}\"" + (watermark == null ? "" : $"\npu:TextBoxHelper.Watermark=\"{watermark}\"") + (icon == null ? "" : $"\npu:TextBoxHelper.Icon=\"\"") + $"\npu:TextBoxHelper.FocusedBorderBrush=\"{TextBoxHelper.GetFocusedBorderBrush(TbCustom).ToColor().ToHexString(false)}\"" + $"\npu:TextBoxHelper.FocusedShadowColor=\"{TextBoxHelper.GetFocusedShadowColor(TbCustom).ToHexString(false)}\"" + (cornerRadius == 0 ? "" : $"\npu:TextBoxHelper.CornerRadius=\"{cornerRadius}\"") + (isClearButtonVisible ? $"\npu:TextBoxHelper.IsClearButtonVisible=\"{isClearButtonVisible}\"" : "") + " />"; }