Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using design time datacontext stops the previewer from updating #209

Open
EricEzaM opened this issue Jun 10, 2022 · 1 comment
Open

Using design time datacontext stops the previewer from updating #209

EricEzaM opened this issue Jun 10, 2022 · 1 comment
Assignees
Labels
kind:bug Something isn't working

Comments

@EricEzaM
Copy link

Whenever I use d:DataContext or Design.DataContext, the Rider previewer stops updating. If I have the design datacontext set and then changing a margin, for example, the preview will not update. As soon as I remove the design datacontext line, the preview updates.

To Reproduce:

  1. Create a new user control and add a child textblock.
  2. Add text to the textblock - the text will update.
  3. Add a design time datacontext to the control by using d:DataContext="{d:DesignInstance ...}" or Design.DataContext="{x:Static ...}"
  4. Change the text in the textblock - the preview will not update.
  5. Remove the d:DataContext definition
  6. Preview updates immediately.
@SKProCH
Copy link

SKProCH commented Sep 26, 2022

Seems like this happens when ViewModel has parameters in constructor. And for me Interaction.Behaviors on my controls also stop previewer from updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants