Kirsty White
Kirsty White

Reputation: 1220

SO style answer creation

When we create questions on SO there is a box to write your message that has Bold, Italic and code brackets.

Is there a similar template for this in C#/wpf??

Upvotes: 0

Views: 126

Answers (3)

Kirsty White
Kirsty White

Reputation: 1220

I noticed that in less that 20 lines you can get this functionality in WPF:

<DockPanel>
    <Menu DockPanel.Dock="Top">
        <MenuItem Header="Edit">
            <MenuItem Command="Cut" Header="_Cut" />
            <MenuItem Command="Copy" Header="C_opy" />
            <MenuItem Command="Paste" Header="_Paste" />
        </MenuItem>
    </Menu>
    <ToolBarTray DockPanel.Dock="Top">
        <ToolBar>
            <Button Command="Cut" Content="Cut" />
            <Button Command="Copy" Content="Copy" />
            <Button Command="Paste" Content="Paste" />
        </ToolBar>
    </ToolBarTray>
    <TextBox SpellCheck.IsEnabled="True" />
</DockPanel>

Would just be really nice to get Bold/Italic and code brackets.

Upvotes: 1

OnResolve
OnResolve

Reputation: 4032

Not is c#; I'm not sure that makes sense. If you're talking about an asp.net rich text editor control, nope there too.

What I've used in the past is one built in jquery that works well with my .net websites. Page validation can be tricky though, since it will recognize the input as potentially dangerous.

Here's a link to jWYSIWYG, the editor I'm talking about: https://github.com/akzhan/jwysiwyg

Upvotes: 2

SLaks
SLaks

Reputation: 887195

No, there isn't.

Try DevExpress DXRichEdit.

Upvotes: 1

Related Questions