muestra un menu de texto para poder manipular algun texto seleccionado
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="281" Width="461">
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top">
<MenuItem Header="Editar">
<MenuItem Header="Cortar" Command="ApplicationCommands.Cut"/>
<MenuItem Header="Copiar" Command="ApplicationCommands.Copy"/>
<MenuItem Header="Pegar" Command="ApplicationCommands.Paste"/>
<Separator/>
<MenuItem Header="Seleccionar Todos" Click="Seleccionar"/>
<MenuItem Header="Destacar" Click="Destacar" FontWeight="Bold" Name="miBold"/>
<MenuItem Header="Italico" Click="Estilo" FontStyle="Italic" Name="miItalic"/>
</MenuItem>
</Menu>
<TextBox Name="txtTextbox" TextWrapping="Wrap">Algun Texto que se te ocurra</TextBox>
</DockPanel>
</Window>
VENTANA DE CODIGO XAML.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication2
{
/// <summary>
/// Lógica de interacción para MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Destacar(object sender, RoutedEventArgs e)
{
txtTextbox.FontWeight = FontWeights.Bold;
}
private void Estilo(object sender, RoutedEventArgs e)
{
txtTextbox.FontStyle = FontStyles.Italic;
}
private void Seleccionar(object sender, RoutedEventArgs e)
{
txtTextbox.SelectAll();
}
}
}