-
Couldn't load subscription status.
- Fork 773
Open
Labels
feature proposalNew feature proposalNew feature proposalteam-ControlsIssue for the Controls teamIssue for the Controls teamwct
Description
Proposal: Add public APIs for FrameworkTemplate and derived types
Some scenarios for libraries are complexified when trying to create FrameworkTemplate and derived types, having to use XamlReader to create them.
Summary
Add the ability to create DataTemplate, ControlTemplate, and ItemsPanelTemplate types from code:
var dataTemplate = new DataTemplate(() => new TextBlock() { Text = "My text" });
var itemsPanelTemplate = new ItemsPanelTemplate(() => new StackPanel());
var controlTemplate = new ControlTemplate(typeof(ContentControl), () => new ContentPresenter());Rationale
This will simplify the creation of Framework Templates and potentially improve performance by remove the parsing of literal XAML.
maxkatz6, MikeHillberg, ranjeshj, stmoy, saint4eva and 21 moresaint4eva, VincentH-Net and baskrenmarcelwgn, saint4eva, VincentH-Net, baskren, mattleibow and 1 moresaint4eva, baskren and mattleibowsaint4eva, VincentH-Net, baskren, Shellishack and LorenzoFerri
Metadata
Metadata
Assignees
Labels
feature proposalNew feature proposalNew feature proposalteam-ControlsIssue for the Controls teamIssue for the Controls teamwct