TextBox ToTextBox(LR.Services.Level level, LR.Services.RoyaltyType type) { var txt = new TextBox() { Name = $"{type.ToString()}_{level.ID.ToString().Replace("-", "_")}", Margin = new Thickness(10, 0, 10, 0) }; txt.TextChanged += Txt_TextChanged; return(txt); }
TextBox ToTextBox(Guid id, LR.Services.RoyaltyType type, decimal value) { var txt = new TextBox() { Name = $"txt_{id.ToString().Replace("-", "_")}", Margin = new Thickness(10, 0, 10, 0), MaxHeight = 30, Text = value.ToString(), TextAlignment = TextAlignment.Right }; txt.GotFocus += Txt_GotFocus; txt.LostFocus += Txt_LostFocus;// += Txt_TextChanged; return(txt); }