SelectionMiniToolbar and customization

4 posts, 1 answers
  1. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 16 Oct 2013 Link to this post

    Hello
    I've tried to make some customization to SelectionMiniToolbar based on information found on this forum but have some troubles.
    To create similar custom toolbar I've used original code however I cannot use it directly because of some properties that are not accessible
    • this.radRichTextBox.CurrentSpanStyle
    • this.radRichTextBox.CurrentParagraphStyle
    • currentSpanStyle.GetPropertyValueSource
    • ((ToggleCommandBase)this.radRichTextBox.Commands.ToggleNumberedCommand).GetToggleState()

    Could you advice me how to implement the same (as example) SelectionMiniToolbar as CustomSelectionMiniToolbar?

    There is other issue I have that causing me trouble when using default SelectionMiniToolbar. When I put following code for RichTextBox:

    this.editor.FontFamily = new FontFamily("Arial");
    this.editor.FontSize = Unit.PointToDip(12);
    this.editor.DocumentInheritsDefaultStyleSettings = true;
    The values on mini toolbar are ones I want however Font and FontSize combos are too big. They are using the same font size as I set for RichTextBox instead of default toolbar ones, which is causing that values are not fit and look ugly (too big).
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 21 Oct 2013 Link to this post

    Hi,

    Could you please specify what exactly you wish to change in the default SelectionMiniToolBar? The customization option might be possible without creating a custom control and we will gladly guide you on how to achieve that. Furthermore, please specify the version of RadControls for WPF you are using in your project.

    As for the issue you are observing related to the default style settings of the editor, it is a known one and already added to our to-do list. Unfortunately, at this point the problem is not scheduled so I cannot say when it will be resolved.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 24 Oct 2013 Link to this post

    Hello
    I'm using 2013.1.403.40 version of telerik controls, and because I'm still observing all errors described in post (implicit style Summer):
    http://www.telerik.com/community/forums/wpf/richtextbox/problem-with-using-rich-text-box-ui.aspx#2678637

    I would like to use custom selection mini toolbar. The other reason is to reduce size of attached dlls and styles. Because I only need (at this moment) mini toolbar, I wanted to created my own one, without necessary of referencing Telerik.Windows.Controls.RichTextBoxUI.dll and Telerik.Windows.Controls.RichTextBoxUI styles.

    I was able to get rid of errors described in that comment, with help from later posts, but because of bug with font size I would like to create my own toolbar, with the same functionality.

    When I would have that I can extend it easily with whatever I want.

    Regards
    Marcin
  5. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 28 Oct 2013 Link to this post

    Hello Marcin,

    Unfortunately, I am a bit confused by your setup.

    The other forum thread you pointed to suggests that the original issue you encountered is resolved, so I'd suggest upgrading your project to a later version of RadControls for WPF. 

    Other than creating a custom mini tool bar you could try changing its style. For this purpose you'd have to use implicit styles. Luckily, implicit styling is a lighter mechanism for styling your application and the NoXaml assemblies are much smaller.

    If you still choose to create a custom toolbar, I'd suggest you upgrade your project to the latest LIB or wait for the upcoming in a month service pack. We introduced a change that improves the inheritability of the control.

    I hope this helps! Let me know if you have additional comments or questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top