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

Hello, I would like to know if it works in WPF. #228

Closed
pomaton12 opened this issue Dec 3, 2023 · 4 comments
Closed

Hello, I would like to know if it works in WPF. #228

pomaton12 opened this issue Dec 3, 2023 · 4 comments
Labels
Resolution/Answered The provided question has been answered. Type/Question

Comments

@pomaton12
Copy link

pomaton12 commented Dec 3, 2023

Hello, I would like to know if CSharpMath works in C# WPF to render Formulas.

@pomaton12 pomaton12 added Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Question labels Dec 3, 2023
@charlesroddie
Copy link
Collaborator

Yes, skiasharp works on wpf so use that and draw on the canvas as in the main .md instructions.

@Happypig375 Happypig375 added Resolution/Answered The provided question has been answered. and removed Status/0. New This issue is new and is awaiting confirmation from the maintainers. labels Dec 3, 2023
@pomaton12
Copy link
Author

` public MainWindow()
{
InitializeComponent();

        var painter = new CSharpMath.Forms.MathView
        {
            LaTeX = "a_b",
        };

        MyPanel.Children.Add(painter);

    }`

I am trying to add a formula to a MyPanel canvas panel in c# wpf

I have the ERROR message: cannot convert from 'CSharpMath.Forms.MathView' to 'System.Windows.UIElement'

@charlesroddie
Copy link
Collaborator

charlesroddie commented Dec 3, 2023

Don't use Forms as that refers to Xamarin.Forms.
Instead use Skiasharp and see the skiasharp instructions.
Perhaps first read the general skiasharp instructions for wpf, and when you have done something simple like drawing a square, then come back here and create a MathPainter and draw a formula.

@Happypig375
Copy link
Collaborator

Answered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution/Answered The provided question has been answered. Type/Question
Projects
None yet
Development

No branches or pull requests

3 participants