So basically what I am trying to do is set a DynamicResource via code using the MVVM pattern.
Those are my resources:
<SolidColorBrush x:Key="UserGroupUserBrush" Color="Transparent"/> <SolidColorBrush x:Key="UserGroupSetterBrush" Color="Yellow"/> <SolidColorBrush x:Key="UserGrougShiftLeaderBrush" Color="{StaticResource ZFBlueColor}"/> <SolidColorBrush x:Key="UserGroupTeamLeaderBrush" Color="Black"/> Right here I want to set the resource:
<Ellipse DataContext="{vw:AdapterBinding UserManagementAdapter}" Fill="{DynamicResource UserGroupSetterBrush}" Height="20" Width="20" Margin="0,0,5,0"/> So lets say I want to change the resource "UserGroupSetterBrush" to "UserGroupUserBrush" in my code. What is the correct way to do this using the MVVM pattern?