protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) { var width = 100D; if (!System.ComponentModel.DesignerProperties.IsInDesignTool) width = this.Width != double.NaN ? this.Width : availableSize.Width; TemplateSettings = new TemplateSettingValues(width); return base.MeasureOverride(availableSize); }
protected override Size MeasureOverride(Size availableSize) { var width = 100D; //if (!DesignerProperties.IsInDesignTool) // width = this.Width != double.NaN ? this.Width : availableSize.Width; TemplateSettings = new TemplateSettingValues(width); return base.MeasureOverride(availableSize); }
protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) { var width = 100D; if (!System.ComponentModel.DesignerProperties.IsInDesignTool) { width = this.Width != double.NaN ? this.Width : availableSize.Width; } TemplateSettings = new TemplateSettingValues(width); return(base.MeasureOverride(availableSize)); }
protected override Size MeasureOverride(Size availableSize) { var width = 100D; if (!DesignMode.DesignModeEnabled) { width = this.Width != double.NaN ? this.Width : availableSize.Width; } TemplateSettings = new TemplateSettingValues(width); return(base.MeasureOverride(availableSize)); }
protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) { var width = 20d; var height = 20d; if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this) == false) { width = double.IsNaN(Width) == false ? Width : availableSize.Width; height = double.IsNaN(Height) == false ? Height : availableSize.Height; } TemplateSettings = new TemplateSettingValues(Math.Min(width, height)); return(base.MeasureOverride(availableSize)); }
public ProgressRing() { this.DefaultStyleKey = typeof(ProgressRing); TemplateSettings = new TemplateSettingValues(60); }
public ProgressRing() { this.DefaultStyleKey = typeof(ProgressRing); TemplateSettings = new TemplateSettingValues(60); }