Telerik Forums
UI for WPF Forum
1 answer
260 views
Hello,
I'm using the Telerik Web Editor, downloading the HTML and loading it into the RichTextBox. What do I need to do to make the RichTextBox look like the web editor?
Specifically, the bulleted lists do not match. At times, users will paste lists from Word into the web editor, and it looks great. If I get the HTML from the editor and reload it back into the editor, it looks the same, but if I load the HTML into the RichTextBox on the desktop, the bulleted list is not right. Here's my WPF code. Loading the following HTML into the web editor looks good, but loading into the RichTextBox on the desktop does not look right.

Thanks,
Scott

HtmlFormatProvider provider = new HtmlFormatProvider();           
string s = "<span style=\"font-family: Calibri;\">\r\n<ul style=\"list-style-type: square;\">\r\n    <li><span style=\"font-family: Wingdings;\">&micro;</span><span style=\"font-family: Calibri;\">You</span>\r\n    <ul style=\"list-style-type: circle;\">\r\n        <li><span style=\"font-family: Calibri;\">Are</span>\r\n        <ul style=\"list-style-type: square;\">\r\n            <li><span style=\"font-family: Calibri;\">Here</span>\r\n            <ul style=\"list-style-type: square;\">\r\n                <li><span style=\"font-family: Calibri;\">Yes</span></li>\r\n            </ul>\r\n            </li>\r\n        </ul>\r\n        </li>\r\n    </ul>\r\n    </li>\r\n</ul>\r\n</span>";
radRichTextBox.Document = provider.Import(s);
Mihail
Telerik team
 answered on 12 Feb 2014
3 answers
182 views
Hello,
look at the two attached screen shots: the Normal image displays the window with a width large enough to display the full title, the Small image displays a window slightly smaller and the Smallest image displays an even smallest window. As you can see, the Small image displays not fully the title, even if it remains plenty of white space; and the Smallest image displays the title left aligned, with missing parts and plenty of empty space at the right.
This is with the Office2013 theme.
Note also that the font for the title is too small.
Patrick
Martin Ivanov
Telerik team
 answered on 12 Feb 2014
1 answer
223 views
Dear Telerik Team!

I have problem setting tab navigation using rad menu control. I have a simple form with 3 textboxes and rad menu containing 2 items. When first textbox is focused and I press tab, the next textbox control gets focus and it works as expected. When last rad menu item gets focus and I press tab, the first rad menu item gets focus and focus never gets back to the first textbox. From now on only rad menu items get focused when the tab is pressed. Can you please help me to get it work correcty? Here is my xaml:
<Window.Resources>
        <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=MainBrush}" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}" />
            <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
            <!--<Setter Property="FocusVisualStyle" Value="{x:Null}" />-->
        </Style>
        <ControlTemplate TargetType="telerik:RadMenuItem" x:Key="LightMenuItemTemplate">
            <Border Name="border" BorderThickness="0"  BorderBrush="Gray"   CornerRadius="0" Background="{TemplateBinding Background}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="10"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Name="contentDescription"   Foreground="Gray"
                             Text="{TemplateBinding Header}" TextWrapping="Wrap" HorizontalAlignment="Center" Grid.Column="2"/>
                </Grid>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="border" Property="BorderBrush" Value="LightGray" />
                    <Setter TargetName="border" Property="BorderThickness" Value="0" />
                    <Setter Property="Opacity" Value="0.5" />
                </Trigger>
                <Trigger Property="IsFocused" Value="False">
                    <Setter TargetName="border" Property="BorderBrush" Value="#FF282828" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter TargetName="border" Property="Opacity" Value="0.4" />
                    <Setter Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style x:Key="MenuItem" TargetType="telerik:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="Margin" Value="5"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="Foreground">
                <Setter.Value>
                    <SolidColorBrush Opacity="0.05" Color="White"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Background" Value="White"/>
            <Setter Property="Template" Value="{StaticResource LightMenuItemTemplate}"></Setter>
        </Style>
        <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
            <Setter Property="IconColumnWidth" Value="27" />
            <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}" />
            <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}" />
            <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="Padding" Value="1 0" />
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate >
                        <themes:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False" />
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikNavigation:RadMenu" >
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ItemsPresenter Margin="{TemplateBinding Padding}"  />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="LightMenu" TargetType="telerik:RadMenu" BasedOn="{StaticResource RadMenuStyle}">
            <Setter Property="Background" Value="White"></Setter>
            <Setter Property="Foreground" Value="Gray"></Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <TextBox Grid.Row="0" TabIndex="0" Text="1" />
        <TextBox Grid.Row="1" TabIndex="1" Text="2" />
        <TextBox Grid.Row="2" TabIndex="2" Text="3" />
        <telerik:RadMenu Style="{DynamicResource LightMenu}" Grid.Row="3" FontStyle="Normal" Foreground="Azure" FontFamily="Arial" FlowDirection="RightToLeft" Height="30" HorizontalAlignment="Right" Margin="0,0,0,0" Name="radMenu" VerticalAlignment="Bottom" Width="400" >
            <telerik:RadMenuItem Style="{DynamicResource MenuItem}" Header="Cancel" x:Name="rmiCancel" VerticalAlignment="Top" TabIndex="4" />
            <telerik:RadMenuItem Style="{DynamicResource MenuItem}" Header="Yes" x:Name="rmiOK" VerticalAlignment="Top" TabIndex="3" />
        </telerik:RadMenu>
    </Grid>

Many thanks for any help and best regards
Krzysztof Kaźmierczak
Kalin
Telerik team
 answered on 12 Feb 2014
8 answers
333 views
Hi All
I have a RadGridView in my code of the namespace "Telerik.Windows.Controls.RadGridView". I need to iterate through the rows and get all the data. I am using the code as :
IList<GridViewRow> rows = RadGridView1.ChildrenOfType<GridViewRow>();
foreach (GridViewRow row in rows)
 {if (!(row is GridViewNewRow))
{foreach (var x in row.Cells)
                    {
                        GridViewCell y = (GridViewCell)x;
                        System.Diagnostics.Debug.WriteLine(y.Value);     
                    }}}

The value comes as null if the column if is of type checkbox. I need some generic code to get the value. 

Anybody any idea about this ??









Dimitrina
Telerik team
 answered on 12 Feb 2014
1 answer
97 views
Hello,
look at these screenshots, with the ribbon set to automatically collapse.
WithScroller shows the application with a width set to display a scroller, with large icons.
SlightlySmaller shows the same application, with its width reduced: some icons are sets to medium and the scroller is gone.
It seems that the trigger to have medium icons is set too late.
Patrick
Martin Ivanov
Telerik team
 answered on 12 Feb 2014
3 answers
112 views
I'm noticing that some of the "node lines" in my RadTreeView are misaligned by a pixel or two.  It doesn't seem to be theme specific, as I see the same issues regardless of the chosen theme.

I've attached an image of the problem.  The red arrows indicate a few examples of where the lines are not quite right.

Thoughts?

Jeff
Boris
Telerik team
 answered on 12 Feb 2014
3 answers
524 views
Hello,

i'm going to build a RadContextMenu and set the ItemSource with the Columns of a RadGridView.
The task is to show a list of names of columns and a CheckBox in front of them to set the Visibility of columns.
But i can not show the CheckBox in my project.
I followed Binding to Dynamic Data and tried the code in definition of RadGridView like this:

<telerik:RadContextMenu.ContextMenu>
  <telerik:RadContextMenu Opened="RadContextMenu_Opened" Opening="RadContextMenu_OnOpening">
    <telerik:RadContextMenu.ItemContainerStyle>
      <Style TargetType="telerik:RadMenuItem">
        <Setter Property="Visibility" Value="{Binding IsReorderable, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <Setter Property="Header" Value="{Binding Header}"/>
        <Setter Property="Icon" Value="{Binding IsVisible}"/>
        <Setter Property="IconTemplate">
          <Setter.Value>
            <DataTemplate>
              <CheckBox IsChecked="{Binding}"/>
            </DataTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </telerik:RadContextMenu.ItemContainerStyle>
  </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>

Is there something wrong in my code?
Thank for any help.

Ivan

Kalin
Telerik team
 answered on 12 Feb 2014
1 answer
94 views
Hello,
when using a RadRibbonWindow as a main window with the Office2013 theme under Windows 7, the title bar is almost invisible when over a dark background. Interestingly, the second window opened by the application has its title displayed correctly.
See the attached screenshots.
Patrick
Martin Ivanov
Telerik team
 answered on 12 Feb 2014
4 answers
222 views
I am using the combobox search and I keep finding that the search doesn't necessarily highlight the item that it has found. Often if I hit return, it selects the item and so I can see that it has found it, but I have my combobox set up to have  auto dropdown, and I would expect that the item that is found is always highlighted.

Do you have any ideas what I may be doing wrong?

Here is a copy of the one of my GridViewComboBoxColumns:


                        <telerik:GridViewComboBoxColumn Header="{Loc Material}" MinWidth="80" Width="150"
                                    ColumnGroupName="columnGroupCostType"
   IsGroupable="False"
   IsFilterable="False"
   EditTriggers="CellClick"
                                    ItemsSourceBinding="{Binding Path=Data.DefaultItemCategories.CostTypes, Source={StaticResource bindingProxy}}"
                                    DataMemberBinding="{Binding Path=MaterialCostTypeCode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                    SelectedValueMemberPath="Code"
                                    DisplayMemberPath="Description"
                                    telerik:TextSearch.TextPath="Code"                                   
                                    ItemTemplate="{StaticResource CostTypeComboBoxItemTemplate}"
                                    IsReadOnlyBinding="{Binding Path=IsMaterialCostTypeReadOnly}"/>





Kalin
Telerik team
 answered on 12 Feb 2014
3 answers
144 views
Hi all,

Our WPF application use many GridViews and most of them allows column sorting. Problem: we often get a crash and this error message when pasting data in a sorted column: "Cell is already in the collection".

I know that you have answered similar problems before (see http://www.telerik.com/community/forums/silverlight/gridview/gridview-exception-on-pasting-from-excel.aspx), but none would help me.

We are currently using GridView.dll version 2012.2.725.40. The language is C# and the IDE is VStudio 2010 on Windows 7 Enterprise 64 bits. The WPF application uses MVVM Light.

Thank you in advance!!

-------------------------------------------------------

- Date: 27/02/2013 14:19:35
- Build: 1.0.0
- Outermost exception: Cell is already in the collection
Parameter name: cellInfo

- No innner exceptions

- Call stack:
   at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.Add(GridViewCellInfo cellInfo) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\Selection\CellInfoCollection.cs:line 130
   at Telerik.Windows.Data.CollectionExtensions.AddRange[T](ICollection`1 collection, IEnumerable`1 items) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Extensions\CollectionExtensions.cs:line 22
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformPaste(String text) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Clipboard\GridViewDataControl.Clipboard.cs:line 322
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PasteFromClipboard() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Clipboard\GridViewDataControl.Clipboard.cs:line 290
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PasteExecuted(Object sender, ExecutedRoutedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 2674
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Vera
Telerik team
 answered on 12 Feb 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?