Not sure how to solve this one.
As soon as I put a combo box within a toolbar it give me this error.
"MeasureOverride returned positive infinity: Telerik.Windows.Documents.Layout.DocumentLayoutBox"
Here is the xaml for the page.
If I remove the combo boxes it works great.
<UserControl x:Class="LeadManager.Client.Controls.RichTextArea" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Documents" |
xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
xmlns:Controls1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" |
xmlns:Controls2="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> |
<Grid x:Name="LayoutRoot" Background="White"> |
<Grid.RowDefinitions> |
<RowDefinition Height="Auto" /> |
<RowDefinition Height="*" /> |
</Grid.RowDefinitions> |
<Controls:RadToolBar HorizontalAlignment="Left" VerticalAlignment="Top"> |
<Controls2:RadButton x:Name="Undo" Click="UndoClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/undo.png" |
ToolTipService.ToolTip="Underline the selected text." /> |
</Controls2:RadButton> |
<Controls2:RadButton x:Name="Redo" Click="RedoClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/redo.png" |
ToolTipService.ToolTip="Underline the selected text." /> |
</Controls2:RadButton> |
<Controls2:RadToggleButton x:Name="Bold" Click="FontWeightClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/bold.png" |
ToolTipService.ToolTip="Make the selected text bold." /> |
</Controls2:RadToggleButton> |
<Controls2:RadToggleButton x:Name="Italic" Click="FontStyleClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/italic.png" |
ToolTipService.ToolTip="Italicize the selected text." /> |
</Controls2:RadToggleButton> |
<Controls2:RadToggleButton x:Name="Underline" Click="UnderlineClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/underline.png" |
ToolTipService.ToolTip="Underline the selected text." /> |
</Controls2:RadToggleButton> |
<Controls2:RadToggleButton x:Name="Strikethrough" Click="StrikethroughClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/Strikethrough16.png" |
ToolTipService.ToolTip="" /> |
</Controls2:RadToggleButton> |
<Controls2:RadToggleButton x:Name="Subscript" Click="SubscriptClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/subscript.png" |
ToolTipService.ToolTip="" /> |
</Controls2:RadToggleButton> |
<Controls2:RadToggleButton x:Name="Superscript" Click="SuperscriptClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/superscript.png" |
ToolTipService.ToolTip="" /> |
</Controls2:RadToggleButton> |
<Controls1:RadComboBox Name="FontCombo" Width="135" IsEditable="True" SelectedIndex="0" |
ToolTipService.ToolTip="Change the font face." |
SelectionChanged="RadComboBoxSelectionChanged"> |
<Controls1:RadComboBoxItem Content="Arial" FontFamily="Arial" /> |
<Controls1:RadComboBoxItem Content="Arial Black" FontFamily="Arial Black" /> |
<Controls1:RadComboBoxItem Content="Calibri" FontFamily="Calibri" /> |
<Controls1:RadComboBoxItem Content="Comic Sans MS" FontFamily="Comic Sans MS" /> |
<Controls1:RadComboBoxItem Content="Courier New" FontFamily="Courier New" /> |
<Controls1:RadComboBoxItem Content="Georgia" FontFamily="Georgia" /> |
<Controls1:RadComboBoxItem Content="Lucida Sans Unicode" FontFamily="Lucida Sans Unicode" /> |
<Controls1:RadComboBoxItem Content="Times New Roman" FontFamily="Times New Roman" /> |
<Controls1:RadComboBoxItem Content="Trebuchet MS" FontFamily="Trebuchet MS" /> |
<Controls1:RadComboBoxItem Content="Verdana" FontFamily="Verdana" /> |
</Controls1:RadComboBox> |
<Controls1:RadComboBox x:Name="FontSizeComboBox" IsTextSearchEnabled="False" IsEditable="True" |
ToolTipService.ToolTip="Change the font size." |
Width="45" SelectedIndex="0" SelectionChanged="FontSizeSelectionChanged"> |
<Controls1:RadComboBoxItem Content="8" /> |
<Controls1:RadComboBoxItem Content="9" /> |
<Controls1:RadComboBoxItem Content="10" /> |
<Controls1:RadComboBoxItem Content="11" /> |
<Controls1:RadComboBoxItem Content="12" /> |
<Controls1:RadComboBoxItem Content="14" /> |
<Controls1:RadComboBoxItem Content="16" /> |
<Controls1:RadComboBoxItem Content="18" /> |
<Controls1:RadComboBoxItem Content="20" /> |
<Controls1:RadComboBoxItem Content="22" /> |
<Controls1:RadComboBoxItem Content="24" /> |
<Controls1:RadComboBoxItem Content="26" /> |
<Controls1:RadComboBoxItem Content="28" /> |
<Controls1:RadComboBoxItem Content="36" /> |
<Controls1:RadComboBoxItem Content="48" /> |
<Controls1:RadComboBoxItem Content="72" /> |
</Controls1:RadComboBox> |
<Controls2:RadButton x:Name="IncreaseFont" Click="IncreaseFontClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/font-increasesize.png" |
ToolTipService.ToolTip="Grow Font" /> |
</Controls2:RadButton> |
<Controls2:RadButton x:Name="DecreaseFont" Click="DecreaseFontClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/font-decreasesize.png" |
ToolTipService.ToolTip="Shrink Font" /> |
</Controls2:RadButton> |
<Controls2:RadButton x:Name="ClearFormattingButton" Click="ClearFormattingButtonClick" > |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/ClearFormatting16.png" |
ToolTipService.ToolTip="Clear Formatting" /> |
</Controls2:RadButton> |
<Controls2:RadDropDownButton Name="HighlightColorSelector"> |
<Image Width="16" Height="16" Source="/LeadManager.Client;component/Assets/Images/RichText/highlight.png" |
ToolTipService.ToolTip="Make text look like it was marked with a highlighter pen." /> |
<Controls2:RadDropDownButton.DropDownContent> |
<Controls1:RadColorSelector x:Name="HighlightColor" NoColorVisibility="Collapsed" StandardPaletteVisibility="Collapsed" |
HeaderPaletteVisibility="Collapsed" MainPalette="Standard" |
SelectedColorChanged="HighlightColorSelectedColorChanged" MainPaletteColumnsCount="5"> |
</Controls1:RadColorSelector> |
</Controls2:RadDropDownButton.DropDownContent> |
</Controls2:RadDropDownButton> |
</Controls:RadToolBar> |
<telerik:RadRichTextBox x:Name="Editor" Background="White" Grid.Row="1" BorderThickness="1" /> |
</Grid> |
</UserControl> |