Reputation: 2153
I was wondering how can I pass a parameter to a StaticResource?
I want to enhance my LoanViewModel constructor to take a string.
public void LoanViewModel(string stringParameter)
{}
At the moment I'm setting the ItemsSource collection to my GridViewComboBoxColumn because of a known telerik bug.
<Telerik:GridViewComboBoxColumn
ItemsSource="{Binding Statuses, Mode=TwoWay, Source={StaticResource LoanViewModel} />
Is there a way to pass a parameter?
Upvotes: 1
Views: 2415
Reputation: 1528
You may try to use property to control behavior. Working around constructor in XAML is little difficult. Or need to use markup extensions. below are some links.
Static resource constructor with parameters
Upvotes: 2