private void UpdateTemplate() { if (ExpanderHelper.GetIcon(EpdCustom) == null) { ExpanderHelper.SetHeaderPadding(EpdCustom, new Thickness(5, SldHeaderPadding.Value, 0, SldHeaderPadding.Value)); } else { ExpanderHelper.SetHeaderPadding(EpdCustom, new Thickness(0, SldHeaderPadding.Value, 0, SldHeaderPadding.Value)); } ExpanderHelper.SetCornerRadius(EpdCustom, new CornerRadius(SldCornerRadius.Value)); }
private void UpdateCode() { var icon = ExpanderHelper.GetIcon(EpdCustom); var cornerRadius = SldCornerRadius.Value; var headerPadding = SldHeaderPadding.Value; var shadow = ExpanderHelper.GetShadowColor(EpdCustom); TbCode.Text = $"<Expander Width=\"{EpdCustom.Width}\"" + $"\nHeader=\"{EpdCustom.Header}\"" + $"\nVerticalAlignment=\"Center\"" + $"\nHorizontalAlignment=\"Center\"" + (icon == null ? "" : $"\npu:ExpanderHelper.Icon=\"\"") + (cornerRadius == 0 ? "" : $"\npu:ExpanderHelper.CornerRadius=\"{cornerRadius}\"") + (headerPadding == 5 ? "" : $"\npu:ExpanderHelper.HeaderPadding=\"10,{headerPadding}\"") + (shadow == null ? "" : $"\npu:ExpanderHelper.ShadowColor=\"LightGray\"") + " />"; }