Binding Silverlight Control to View Model element?
-
29-10-2019 - |
문제
Say I have:
<TextBlock Text="{Binding MyString}"/>
public class AlanViewModel {
public string MyString {get; set;}
public TextBlock Control { get; set; } //How to bind this to the TextBlock control?
}
Can I bind the instance of the control to the ViewModel, or must I continue to jump through hoops in the code-behind to couple them together?
I know this couples the ViewModel to the View, but it's for a good reason.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow