I have a class that is a viewmodel (using Prism). It has an associated XAML view. When I do
this.Cursor
there isn’t any Cursor property available. What must I do in order to access the cursor so I can change its icon?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since the
Cursoris a UI-related property, you should set the cursor in the View, not the ViewModel.this.Cursorshould work fine from the code-behind the ViewIf your
Cursoris based on something in theViewModelsuch as if it’s loading data, then use aDataTriggerin your XAML to change the Cursor when something like anIsLoadingproperty is set to true