Skip to content

Elegant work-around for omitting most parameterless constructor logic for live preview? #16464

Answered by TangDave
TangDave asked this question in Q&A
Discussion options

You must be logged in to vote

Found a solution, which seems to work well:

I just add this to the constructor, immediately after the call to InitializeComponent:

		//want to exit here for Avalonia Live Preview mode:
		if (Avalonia.Controls.Design.IsDesignMode)
			return;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TangDave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant