Hi everybody, I am using a RadRichTextBoxRibbonUI in my Notebook control and it's taking some time to load (about 2 seconds). So does anybody have any idea to solve this issue?
<telerik:RadRichTextBoxRibbonUI Grid.Row="0" BackstageClippingElement="{Binding ElementName=uiRichTextBoxParent}" CollapseThresholdSize="50,50" ApplicationButtonContent="File" wpf:UISettings.Identifier="Blue" wpf:UISettings.Type="{x:Type local:RichTextAdvancedControlSetting}" IsMinimized="{wpf:UISettings Path=RibbonUiIsMinimized}" DataContext="{Binding Commands, ElementName=uiRichTextBox}" ApplicationName="" Title="" IsMinimizable="True" MinimizeButtonVisibility="Visible"> <telerik:RadRichTextBoxRibbonUI.Resources> <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider"/> <telerik:EditingContextTypeToBoolConverter x:Key="EditingContextTypeToBoolConverter"/> </telerik:RadRichTextBoxRibbonUI.Resources> <telerik:RadRichTextBoxRibbonUI.Backstage> <telerik:RadRibbonBackstage> <telerik:RadRibbonBackstageItem Header="New" Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/new.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding NewDocumentCommand}"/> <telerik:RadRibbonBackstageItem Header="Open" Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/open.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenDocumentCommand}"/> <telerik:RadRibbonBackstageItem Header="Save" Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}"/> <telerik:RadRibbonBackstageItem Header="Save As" Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/saveas.png" IsDefault="false"> <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0" UseLayoutRounding="True"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" FontFamily="Verdana" Text="Save As"/> <Rectangle Fill="Gray" HorizontalAlignment="Left" Height="1" Width="410"/> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="docx" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/worddoc.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Word Document"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save the file as a Word document." Width="300"/> </StackPanel> </StackPanel> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="pdf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Pdf.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="PDF Document"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document as a PDF file." Width="300"/> </StackPanel> </StackPanel> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="html" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/html.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="HTML Document"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save the file as a HTML document." Width="300"/> </StackPanel> </StackPanel> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="rtf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Rtf.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Rich Text Format"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document in Rich Text Format." Width="300"/> </StackPanel> </StackPanel> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="txt" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/PlainText.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Plain text"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document in plain text format." Width="300"/> </StackPanel> </StackPanel> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="xaml" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Xaml.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="XAML Document"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document as a XAML file." Width="300"/> </StackPanel> </StackPanel> </StackPanel> </telerik:RadRibbonBackstageItem> <telerik:RadRibbonBackstageItem Header="Print" Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/print.png" IsDefault="true"> <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0" UseLayoutRounding="True"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" FontFamily="Verdana" Text="Print"/> <Rectangle Fill="Gray" HorizontalAlignment="Left" Height="1" Width="410"/> <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Native" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PrintCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90"> <Image HorizontalAlignment="Center" Source="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/pagesetup.png" Stretch="None"/> </telerik:RadRibbonButton> <StackPanel Margin="20 0 0 0"> <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Native Print"/> <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Send the document directly to the default printer without making changes." Width="300"/> </StackPanel> </StackPanel> </StackPanel> </telerik:RadRibbonBackstageItem> </telerik:RadRibbonBackstage> </telerik:RadRichTextBoxRibbonUI.Backstage> <telerik:RadRichTextBoxRibbonUI.ContextualGroups> <telerik:RadRibbonContextualGroup x:Name="TableTools" Header="Table Tools"> <telerik:RadRibbonContextualGroup.IsActive> <Binding Converter="{StaticResource EditingContextTypeToBoolConverter}" Mode="OneWay" Path="AssociatedRichTextBox.CurrentEditingContext.Type"> <Binding.ConverterParameter> <telerik:EditingContextTypes>Table</telerik:EditingContextTypes> </Binding.ConverterParameter> </Binding> </telerik:RadRibbonContextualGroup.IsActive> </telerik:RadRibbonContextualGroup> <telerik:RadRibbonContextualGroup x:Name="HeaderFooterTools" Header="Header & Footer Tools"> <telerik:RadRibbonContextualGroup.IsActive> <Binding Converter="{StaticResource EditingContextTypeToBoolConverter}" Mode="OneWay" Path="AssociatedRichTextBox.CurrentEditingContext.Type"> <Binding.ConverterParameter> <telerik:EditingContextTypes>HeaderFooter</telerik:EditingContextTypes> </Binding.ConverterParameter> </Binding> </telerik:RadRibbonContextualGroup.IsActive> </telerik:RadRibbonContextualGroup> </telerik:RadRichTextBoxRibbonUI.ContextualGroups> <telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar> <telerik:QuickAccessToolBar HorizontalAlignment="Left" Width="90"> <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" Text="Save"/> <telerik:RadRibbonSplitButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding UndoCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/undo.png" Text="Undo"> <telerik:RadRibbonSplitButton.DropDownContent> <telerik:MultipleUndoControl telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding MultipleUndoCommand}"/> </telerik:RadRibbonSplitButton.DropDownContent> </telerik:RadRibbonSplitButton> <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RedoCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/redo.png" Text="Redo"/> </telerik:QuickAccessToolBar> </telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar> <!--<telerik:RadRibbonTab Header="Tools"> <telerik:RadRibbonGroup Header="Clipboard"> <telerik:RadCollapsiblePanel> <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Cut the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CutCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/cut.png" Text="Cut" telerik:ScreenTip.Title="Cut"/> <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CopyCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/copy.png" Text="Copy" telerik:ScreenTip.Title="Copy"/> <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Paste the contents of the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PasteCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/paste.png" Text="Paste" telerik:ScreenTip.Title="Paste"/> </telerik:RadCollapsiblePanel> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" telerik:ScreenTip.Description="Show the font dialog box." Header="Font" telerik:ScreenTip.Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/FontDialog.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFontPropertiesDialogCommand}" telerik:ScreenTip.Title="Font"> <telerik:RadOrderedWrapPanel> <StackPanel Orientation="Horizontal"> <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding SelectedValue, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font family." IsReadOnly="True" ItemsSource="{Binding RegisteredFonts, Source={StaticResource FontFamiliesProvider}}" MaxDropDownHeight="400" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontFamilyCommand}" telerik:ScreenTip.Title="Font" Width="132"/> <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding SelectedItem.Tag, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font size." IsEditable="True" IsReadOnly="True" IsTextSearchEnabled="False" MaxDropDownHeight="400" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontSizeCommand}" telerik:ScreenTip.Title="Font Size" Width="65"> <telerik:RadRibbonComboBoxItem Content="8" Tag="10.67"/> <telerik:RadRibbonComboBoxItem Content="9" Tag="12"/> <telerik:RadRibbonComboBoxItem Content="10" Tag="13.34"/> <telerik:RadRibbonComboBoxItem Content="11" Tag="14.67"/> <telerik:RadRibbonComboBoxItem Content="12" Tag="16"/> <telerik:RadRibbonComboBoxItem Content="14" Tag="18.67"/> <telerik:RadRibbonComboBoxItem Content="16" Tag="21.33"/> <telerik:RadRibbonComboBoxItem Content="18" Tag="24"/> <telerik:RadRibbonComboBoxItem Content="20" Tag="26.67"/> <telerik:RadRibbonComboBoxItem Content="22" Tag="29.33"/> <telerik:RadRibbonComboBoxItem Content="24" Tag="32"/> <telerik:RadRibbonComboBoxItem Content="26" Tag="34.67"/> <telerik:RadRibbonComboBoxItem Content="28" Tag="37.33"/> <telerik:RadRibbonComboBoxItem Content="36" Tag="48"/> <telerik:RadRibbonComboBoxItem Content="48" Tag="64"/> <telerik:RadRibbonComboBoxItem Content="72" Tag="96"/> </telerik:RadRibbonComboBox> </StackPanel> <telerik:RadButtonGroup> <telerik:RadRibbonButton telerik:ScreenTip.Description="Increase the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding IncrementFontSizeCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-increasesize.png" telerik:ScreenTip.Title="Grow Font"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Decrease the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DecrementFontSizeCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-decreasesize.png" telerik:ScreenTip.Title="Shrink Font"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonButton telerik:ScreenTip.Description="Clear all the formatting from the selection, leaving only the plain text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ClearAllFormattingCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ClearFormatting16.png" telerik:ScreenTip.Title="Clear All Formatting"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Make the selected text bold." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBoldCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/bold.png" telerik:ScreenTip.Title="Bold"/> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Italicize the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleItalicCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/italic.png" telerik:ScreenTip.Title="Italic"/> <telerik:RadRibbonSplitButton telerik:ScreenTip.Description="Underline the selected text." IsToggle="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleUnderlineCommand}" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/underline.png" telerik:ScreenTip.Title="Underline"> <telerik:RadRibbonSplitButton.DropDownContent> <telerik:RadGallery Height="210" ItemWidth="156" ItemHeight="26" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeUnderlineDecorationCommand}" ViewportWidth="157"> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline1.png" Tag="Line"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline2.png" Tag="DoubleLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline3.png" Tag="ThickLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline4.png" Tag="DottedLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline5.png" Tag="DashedLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline6.png" Tag="DotDashedLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline7.png" Tag="DotDotDashedLine"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline8.png" Tag="Wave"/> </telerik:RadGallery> </telerik:RadRibbonSplitButton.DropDownContent> </telerik:RadRibbonSplitButton> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Draw a line through the middle of the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleStrikethroughCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Strikethrough16.png" telerik:ScreenTip.Title="Strikethrough"/> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small letters below the text baseline." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSubscriptCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/subscript.png" telerik:ScreenTip.Title="Subscript"/> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small text above the line of text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSuperscriptCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/superscript.png" telerik:ScreenTip.Title="Superscript"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:HighlightColorPicker AutomaticColor="Transparent" BorderThickness="0" telerik:ScreenTip.Description="Make text look like it was marked with a highlighter pen." Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/highlight.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontHighlightColorCommand}" SelectedColor="Yellow" telerik:ScreenTip.Title="Text Highlight Color"/> <telerik:HighlightColorPicker BorderThickness="0" telerik:ScreenTip.Description="Change the text color." Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontForeColorCommand}" SelectedColor="Red" telerik:ScreenTip.Title="Font Color"/> </telerik:RadButtonGroup> </telerik:RadOrderedWrapPanel> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" telerik:ScreenTip.Description="Show the Paragraph dialog box." Header="Paragraph" telerik:ScreenTip.Icon="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PropertiesDialog.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowParagraphPropertiesDialogCommand}" telerik:ScreenTip.Title="Paragraph"> <telerik:RadOrderedWrapPanel> <telerik:RadButtonGroup> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Start a bulleted list." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBulletsCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-bullets.png" telerik:ScreenTip.Title="Bullets"/> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Start a numbered list." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleNumberedCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-numbered.png" telerik:ScreenTip.Title="Numbering"/> <telerik:RadRibbonDropDownButton telerik:ScreenTip.Description="Start a multilevel list. Click the arrow to choose different multilevel list styles." Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/MultilevelList.png" telerik:ScreenTip.Title="Multilevel List"> <telerik:RadRibbonDropDownButton.DropDownContent> <StackPanel> <ScrollViewer MaxHeight="565"> <StackPanel> <telerik:RadGroupHeader Content="List Library"/> <telerik:RadGallery Height="176" ItemWidth="88" ItemHeight="88" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeListStyleCommand}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ViewportWidth="266"> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNone.png" Tag="None"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListBulleted.png" Tag="Bulleted"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumbered.png" Tag="Numbered"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedParenthesis.png" Tag="NumberedParenthesis"/> <telerik:RadGalleryItem Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedHierarchical.png" Tag="NumberedHierarchical"/> </telerik:RadGallery> <telerik:ListStylesGallery AssociatedRichTextBox="{Binding AssociatedRichTextBox, Mode=OneWay}"/> </StackPanel> </ScrollViewer> <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowDefineNewListStyleDialogCommand}" Size="Medium" Text="Define New List Style ..."/> </StackPanel> </telerik:RadRibbonDropDownButton.DropDownContent> </telerik:RadRibbonDropDownButton> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonButton telerik:ScreenTip.Description="Decrease the indent level of the paragraph." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DecrementParagraphLeftIndentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/outdent.png" telerik:ScreenTip.Title="Decrease Indent"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Increase the indent level of the paragraph." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding IncrementParagraphLeftIndentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/indent.png" telerik:ScreenTip.Title="Increase Indent"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Set the direction of text to be displayed from left to right." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphFlowDirectionCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/LeftToRightFlowDirection.png" Text="Left-to-Right Text Direction" telerik:ScreenTip.Title="Left-To-Right Text Direction"> <telerik:RadRibbonToggleButton.CommandParameter> <FlowDirection>LeftToRight</FlowDirection> </telerik:RadRibbonToggleButton.CommandParameter> </telerik:RadRibbonToggleButton> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Set the direction of text to be displayed from right to left." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphFlowDirectionCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/RightToLeftFlowDirection.png" Text="Right-to-Left Text Direction" telerik:ScreenTip.Title="Right-To-Left Text Direction"> <telerik:RadRibbonToggleButton.CommandParameter> <FlowDirection>RightToLeft</FlowDirection> </telerik:RadRibbonToggleButton.CommandParameter> </telerik:RadRibbonToggleButton> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Show paragraph marks and other hidden formatting symbols." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleFormattingSymbolsCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/formatting-symbols.png" telerik:ScreenTip.Title="Show/Hide Formatting Symbols"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:RadRibbonToggleButton CommandParameter="Left" telerik:ScreenTip.Description="Align text to the left." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignleft.png" Text="Align Left" telerik:ScreenTip.Title="Align Text Left"/> <telerik:RadRibbonToggleButton CommandParameter="Center" telerik:ScreenTip.Description="Center text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/aligncenter.png" Text="Center" telerik:ScreenTip.Title="Center"/> <telerik:RadRibbonToggleButton CommandParameter="Right" telerik:ScreenTip.Description="Align text to the right." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignright.png" Text="Align Right" telerik:ScreenTip.Title="Align Text Right"/> <telerik:RadRibbonToggleButton CommandParameter="Justify" telerik:ScreenTip.Description="Align text to both left and right margins, adding extra space between words as necessary." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignjustify.png" Text="Justify" telerik:ScreenTip.Title="Justify"/> </telerik:RadButtonGroup> <telerik:RadButtonGroup> <telerik:HighlightColorPicker AutomaticColor="Transparent" BorderThickness="0" telerik:ScreenTip.Description="Color the background behind the selected paragraph." Image="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ParagraphBackgroundColor.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphBackgroundColorCommand}" SelectedColor="Transparent" telerik:ScreenTip.Title="Shading"/> </telerik:RadButtonGroup> </telerik:RadOrderedWrapPanel> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Editing & Proofing"> <telerik:RadCollapsiblePanel> <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Find or replace text in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFindReplaceDialogCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Find.png" Text="Find/Replace" telerik:ScreenTip.Title="Find/Replace"/> <telerik:RadRibbonToggleButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Enable/Disable spell checking." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSpellCheckingCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/EnableSpellCheck.png" Text="Enable Spell Check" telerik:ScreenTip.Title="Spell Check"/> <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Open context menu on next spelling error." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenContextMenuOnNextSpellingErrorCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FindNextSpellingError.png" Text="Find Next Error" telerik:ScreenTip.Title="Next Error"/> </telerik:RadCollapsiblePanel> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Styles"> <telerik:StylesGallery AssociatedRichTextBox="{Binding AssociatedRichTextBox, Mode=OneWay}"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Change the set of styles, colors, fonts and paragraph spacing used in this document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/ChangeStyles.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowManageStylesDialogCommand}" Size="Large" Text="Change Styles" telerik:ScreenTip.Title="Change Styles"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup/> </telerik:RadRibbonTab> <telerik:RadRibbonTab Header="Insert"> <telerik:RadRibbonGroup Header="Pages"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Start the next page at the current position." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageBreak.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPageBreakCommand}" Size="Large" Text="Page Break" telerik:ScreenTip.Title="Page Break"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Tables"> <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding InsertTableCommand}" telerik:ScreenTip.Description="Insert a table into the document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTable.png" Size="Large" Text="Table" telerik:ScreenTip.Title="Table"> <telerik:RadRibbonDropDownButton.DropDownContent> <StackPanel> <telerik:RadRibbonButton ClickMode="Press"> <telerik:TableSizePicker Command="{Binding InsertTableCommand}"/> </telerik:RadRibbonButton> <telerik:RadMenuItem IsSeparator="True"/> <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertTableDialogCommand}" Size="Medium" SmallImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/InsertTable.png" Text="Insert Table..."/> </StackPanel> </telerik:RadRibbonDropDownButton.DropDownContent> </telerik:RadRibbonDropDownButton> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Illustrations"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert a picture from a file." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Picture.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPictureCommand}" Size="Large" Text="Picture" telerik:ScreenTip.Title="Insert Picture from File"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Links"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Create a link to a Web page, a picture or an e-mail address." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/inserthyperlink.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertHyperlinkDialogCommand}" Size="Large" Text="Hyperlink" telerik:ScreenTip.Title="Insert Hyperlink"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Create a bookmark to assign a name to a specific point in a document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertBookmark.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowManageBookmarksDialogCommand}" Size="Large" Text="Bookmark" telerik:ScreenTip.Title="Bookmark"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Refer to items such as headings, figures and tables." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertCrossReference.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertCrossReferenceWindowCommand}" Size="Large" Text="Cross-reference" telerik:ScreenTip.Title="Cross-reference"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Comments"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a comment about the selection." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/NewComment.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertCommentCommand}" Size="Large" Text="New Comment" telerik:ScreenTip.Title="Insert Comment"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Header & Footer"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Edit the header of the document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/EditHeader.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding EditHeaderCommand}" Size="Large" Text="Header" telerik:ScreenTip.Title="Header"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Edit the footer of the document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/EditFooter.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding EditFooterCommand}" Size="Large" Text="Footer" telerik:ScreenTip.Title="Footer"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Text"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert the current date or time into the current document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertDateTime.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertDateTimeDialogCommand}" Size="Large" Text="Date & Time" telerik:ScreenTip.Title="Insert Date and Time"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert page numbers into the document." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertPageNumber.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPageFieldCommand}" Size="Large" Text="Page Number" telerik:ScreenTip.Title="Insert Page Number"/> <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert block containing formatted programming source code." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/CodeBlock.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowCodeFormattingDialogCommand}" Size="Large" Text="Code" telerik:ScreenTip.Title="Insert Code Block"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="Symbols"> <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert symbols that are not on your keyboard, such as copyright symbols, trademark symbols, paragraph marks, and Unicode characters." LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Symbol.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertSymbolWindowCommand}" Size="Large" Text="Symbol" telerik:ScreenTip.Title="Insert Symbol"/> </telerik:RadRibbonGroup> </telerik:RadRibbonTab>--> </telerik:RadRichTextBoxRibbonUI>Hello, I am using a single page RadDataForm to send information to an outside API. I've gone through the getting started sections of the documentation but have had issues finding anything in regards taking the data from the active sheet of the form to go elsewhere. I know that binding data to the form is as easy as this.DataForm1.CurrentItem = Customer.defaults() and I can get my data onto the form. What I don't understand is how to do anything with that data once I've altered it or written over it. I have created a separate button that should submit an API post call with this information and clear the fields to be blank so another customer can be added.
Any help would be greatly appreciated.
Im able to export the contents of radgridview to PDF, however I want to mail the contents as PDF attachment in outlook without saving it on my system
How to achieve this?
I have table x in a database having around 30 columns with 6000 records.
When bind this table data in xaml using a class representation say List<X>, then on Export I get a Out of Memory Exception.
But when I Export the same table data using DataTable, then I do not get any exception.
I wanted to the reason behind this behavior ?
I need to have formatted numbers in RadGridView, my columns looks like below:
<telerik:GridViewDataColumn DataMemberBinding="{Binding MarketValue}"
DataFormatString="n2">
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding MarketValue, StringFormat=n2}"></TextBox>
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
based on this post: http://www.telerik.com/forums/numeric-input-with-decimals-in-gridviewmaskedinputcolumn#oNu7_qiNFkS-vjfxCML3sQ
I want to have an opportunity to copy multiple cells from the Grid and paste them into excel file or notepad and it works out-of-th-box.
Unfortunately I cannot reverse it - I cannot change some values in excel file, copy them and paste into RadGridView. Is there any way to do it easily?
Hi guys!
I was tasked with finding a way to rewrite our old WinForms app to WPF (due to some experience with it in time long past), with special attention for PropertyGrid controls. Decided to go with Telerik and to my surprise it has the same problem as most open source solutions, namely: when binding to PropertyBag containing enum definitions, enum values are not selected in the dropdowns - the options are there, just unselected. I'm pretty sure I do something wrong, so I'd appreciate a look at the code and some tips. Code for View, ViewModel and CustomProperty/Descriptor can be found below:
View:
1.<Window.Resources>2. <my:MyViewModel x:Key="MyViewModel"/>3. </Window.Resources>4. <Grid DataContext="{StaticResource MyViewModel}">5. <telerik:RadPropertyGrid HorizontalAlignment="Left" Name="radPropertyGrid1" VerticalAlignment="Top" Height="452" Width="465" Item="{Binding Collection}"/>6. </Grid>ViewModel:
01.public class MyViewModel : INotifyPropertyChanged02. {03. public event PropertyChangedEventHandler PropertyChanged;04. ObservableCollection<CustomProperty> cpList = new ObservableCollection<CustomProperty>()05. {06. new CustomProperty { Name = "Foo", Desc = "Test", Type = typeof(int), Value1 = 0 },07. new CustomProperty { Name = "Foo2", Desc = "Test2", Type = typeof(int), Value1 = 1 },08. new CustomProperty { Name = "Foo3", Desc = "Test3", Type = typeof(WpfApplication1.Enum), Value1 = WpfApplication1.Enum.Value2 }09. };10. 11. public PropertyBag Collection12. {13. get14. {15. return new PropertyBag(cpList);16. }17. }18. 19. private object selectedItem;20. public object SelectedItem21. {22. get { return this.selectedItem; }23. set24. {25. if (value != this.selectedItem)26. {27. this.selectedItem = value;28. this.OnPropertyChanged("SelectedItem");29. }30. }31. }32. 33. protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)34. {35. PropertyChangedEventHandler handler = this.PropertyChanged;36. if (handler != null)37. {38. handler(this, args);39. }40. }41. 42. private void OnPropertyChanged(string propertyName)43. {44. this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));45. }46. }CustomProperty/Descriptor:
001.public enum Enum002. {003. Value1 = 1,004. Value2 = 2005. }006. 007. public class CustomProperty008. {009. public string Name { get; set; }010. public string Desc { get; set; }011. public object DefaultValue { get; set; }012. public object Value1 013. { 014. get { return currentValue; } 015. set016. { 017. currentValue = value;018. } 019. }020. 021. Type type;022. public Type Type023. {024. get025. {026. return type;027. }028. set029. {030. type = value;031. DefaultValue = Activator.CreateInstance(value);032. }033. }034. 035. private bool validate;036. private PropertyBag subProperty;037. private object currentValue;038. 039. private string GetText(string textId)040. {041. return textId;042. }043. 044. public string Id045. {046. get { return string.Empty; }047. }048. 049. public string Category050. {051. get { return "Category"; }052. }053. 054. public string Hint055. {056. get057. {058. return "Hint";059. }060. }061. 062. public bool UpperCase063. {064. get { return false; }065. }066. 067. public string EditorTypeName068. {069. get { return "Naaah"; }070. }071. 072. public string DropDownEditor073. {074. get { return "Uh-uh"; }075. }076. 077. public string Caption078. {079. get { return Name; }080. }081. 082. public string TypeName083. {084. get { return type.ToString(); }085. }086. 087. public bool PermanentReadOnly088. {089. get { return false; }090. }091. 092. public bool ReadOnly093. {094. get { return false; }095. }096. 097. public string MinValue098. {099. get { return ""; }100. }101. 102. public string MaxValue103. {104. get { return "0"; }105. }106. 107. public bool Validate108. {109. get { return validate; }110. }111. 112. public PropertyBag SubProperty113. {114. get {return subProperty;}115. set {subProperty = value;}116. }117. 118. public int SortOrder119. {120. get { return 0; }121. }122. 123. public bool Hide124. {125. get { return false; }126. }127. 128. public string DevTypeConverter129. {130. get { return "None"; }131. }132. 133. public string GetAttribute(string key)134. {135. return "";// this.deviceData != null ? this.deviceData.GetAttribute(key) : null;136. }137. }138. 139. public class CustomPropertyDescriptor : PropertyDescriptor140. {141. public CustomProperty pSpec = null;142. public PropertyBag pBag;143. 144. public CustomPropertyDescriptor(CustomProperty cp, PropertyBag pb, Attribute[] attrs) : base(cp.Name, attrs)145. {146. pSpec = cp;147. pBag = pb;148. }149. 150. public override Type ComponentType151. {152. get { return typeof(CustomProperty); }153. }154. 155. public override object GetValue(object component)156. {157. if (pSpec.DefaultValue is System.Enum)158. return (int)pSpec.Value1;159. return pSpec.Value1; 160. }161. 162. public override bool IsReadOnly163. {164. get { return false; }165. }166. 167. public override Type PropertyType168. {169. get170. {171. return pSpec.Type;172. }173. }174. 175. public override void ResetValue(object component)176. {177. SetValue(component, pSpec.DefaultValue);178. }179. 180. public override void SetValue(object component, object value)181. {182. pSpec.Value1 = value;183. }184. 185. private string GetText(string textId)186. {187. return textId;188. }189. 190. public string GetPropId191. {192. get193. { return pSpec.Id; }194. }195. 196. public override string Category197. {198. get199. {200. return pSpec.Category;201. }202. }203. 204. public override string DisplayName205. {206. get207. {208. return pSpec.Caption;209. }210. }211. 212. public override string Description213. {214. get215. {216. return pSpec.Hint;217. }218. }219. 220. public override bool IsBrowsable221. {222. get223. {224. return true;225. }226. }227. 228. public override bool CanResetValue(object component)229. {230. return false;231. }232. 233. public override bool ShouldSerializeValue(object component)234. {235. if (pSpec.TypeName == "BoolDefined")236. {237. if (pSpec.Value1 == null)238. return false;239. if (pSpec.Value1.ToString().Length > 0)240. if (Convert.ToBoolean(pSpec.Value1, CultureInfo.InvariantCulture))241. return true;242. }243. return false;244. }245. }Thanks in advance for any help you can offer:)