-
Notifications
You must be signed in to change notification settings - Fork 671
Add RichEditBox Math Mode Examples #1813
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
Add RichEditBox Math Mode Examples #1813
Conversation
Implemented a new `ControlExample` in `RichEditBoxPage.xaml` for a math mode editor, featuring a `RichEditBox` for input, a `SelectorBar` for symbol selection, and a grid layout for displaying symbols with their properties. Added styles for alternating row backgrounds and set a description for math mode functionality. Updated `RichEditBoxPage.xaml.cs` to initialize math mode, populate a list of mathematical symbols, and handle symbol insertion. Introduced a new `MathSymbol` class to encapsulate symbol properties.
Introduced `MathModeHelper.cs` with a static class to manage a collection of mathematical symbols as `ObservableCollection<MathSymbol>`, including methods for commands input so symbols can be added where the cursor is stoping. Updated `RichEditBoxPage.xaml` to use the new namespace and modified `RichEditBoxPage.xaml.cs` to utilize `MathModeHelper.GetSymbolsCollection()` for symbol initialization, simplifying the code. The `MathSymbol` class is now encapsulated within `MathModeHelper.cs`.
@niels9001 @marcelwgn @Hemantxk Before going further with this PR, could you review it? The remaining work is mostly repetitive, and the main ideas are already in place. Do I have the green light to complete it? |
I think it looks great :)! Please go ahead! |
…oLCID, as the language identifier is deprecated
/azp run |
Thank you! Really appreciate the efforts you put into checking in these examples. Can you also attach few more screenshots of the new sections from different pages? Structures/Integrals/Accent etc. |
/azp run |
Thank you for making this PR @Zakariathr22 and sorry for not getting back to it earlier. Besides the table discussion (on which I will get back to you next week) and whether to include it or not, I think it is good as is 😊 P.S. I understand the choice for using one of the most famous equations in the world to highlight the feature though as a math nerd I would have loved to see something out of ZFC or similar (no need to change this though) |
Thank you @Zakariathr22 for your continuously keeping this PR up to date! As of right now, I think the best direction right now would be to not include the table of symbols due to its complexity. Otherwise the PR looks good to me 😊 |
@marcelwgn Just to clarify, did you mean removing just this table, or the entire section (symbols and structures)? |
I think we should keep the samples but get rid of the tables altogether. I know you worked hard on this and you did an excellent job so I am sorry we are taking this turn but I think right now this is the best direction for these samples. |
I think GitHub should really add a 💔 reaction for moments like this 😄
But to be fair, your suggestion makes sense and I’ll go with it 👍 |
…iathr22/WinUI-Gallery into feature/richedit-math-mode
Co-authored-by: Marcel W. <marcel.alex.wagner@outlook.com>
Co-authored-by: Marcel W. <marcel.alex.wagner@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this contribution and keeping this PR continously up to date!
/azp run |
Description
This PR adds new examples demonstrating the Math Mode features in RichEditBox.
Motivation and Context
Helping developers understand how to use math mode.
How Has This Been Tested?
Manually tested.
Screenshots (if appropriate):
Types of Changes