public object Convert(object value, Type targetType, object parameter, string language) { if (value is int) { return(FontIconHelper.GetAppIcon((int)value)); } return(0); }
private void OnIconChanged(DependencyPropertyChangedEventArgs e) { AppIconType type = (AppIconType)e.NewValue; this.templateLoaded = () => this.textBlock.Text = FontIconHelper.GetSymbolCode(type); if (this.textBlock != null) { this.templateLoaded(); this.templateLoaded = null; } }