Telerik Forums
UI for WPF Forum
1 answer
106 views
Hi,

 

I am trying to get a series of tab RichTextEditors to return formatted text as html markup fragments, and not the fully-qualified HTML doc.  We use this same RichTextEdit elsewhere which honors the formatting settings to return fragments (but not in a tab control), but in the context below, it always returns the default full html doc no matter what.  Originally this was using a resource dictionary, but I inlined the HTMLDataProvider to try to isolate the problem

 
<telerik:RadTabControl Style="{DynamicResource TabControlNoHeaderBackground}" ItemsSource="{Binding Disclosures}">
    <telerik:RadTabControl.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding DisclosureTypeName}" />
        </DataTemplate>
    </telerik:RadTabControl.ItemTemplate>
    <telerik:RadTabControl.ContentTemplate>
        <DataTemplate>
            <Grid>
                <telerik:HtmlDataProvider x:Name="CustomerHtmlDataProvider"
                                          Html="{Binding Content, Mode=TwoWay}"
                                          RichTextBox="{Binding ElementName=TxtDisclosureContent}">
                    <telerik:HtmlDataProvider.FormatProvider>
                        <telerik:HtmlFormatProvider>
                            <telerik:HtmlFormatProvider.ExportSettings>
                                <telerik:HtmlExportSettings
                                    DocumentExportLevel="Fragment"
                                    ImageExportMode="None"
                                    ExportFontStylesAsTags="True"
                                    ExportStyleMetadata="False">
                                </telerik:HtmlExportSettings>
                            </telerik:HtmlFormatProvider.ExportSettings>
                        </telerik:HtmlFormatProvider>
                    </telerik:HtmlDataProvider.FormatProvider>
                </telerik:HtmlDataProvider>
                <telerik:RadRichTextBox x:Name="TxtDisclosureContent" IsSpellCheckingEnabled="False" />
            </Grid>
        </DataTemplate>
    </telerik:RadTabControl.ContentTemplate>
</telerik:RadTabControl>
Mihail
Telerik team
 answered on 20 Apr 2016
1 answer
97 views

I'm trying to use a RadTileView for a project and it is throwing an exception when I open the tiles. They open for a few seconds and then the following exception is thrown:

System.InvalidOperationException: 'RestoreIcon1' name cannot be found in the name scope of 'System.Windows.Controls.Grid'.<br>   at System.Windows.Media.Animation.Storyboard.ResolveTargetName(String targetName, INameScope nameScope, DependencyObject element)<br>   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)<br>   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)<br>   at System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer)<br>   at System.Windows.VisualStateGroup.StartNewThenStopOld(FrameworkElement element, Storyboard[] newStoryboards)<br>   at System.Windows.VisualStateManager.GoToStateInternal(FrameworkElement control, FrameworkElement stateGroupsRoot, VisualStateGroup group, VisualState state, Boolean useTransitions)<br>   at System.Windows.VisualStateManager.GoToStateCommon(FrameworkElement control, FrameworkElement stateGroupsRoot, String stateName, Boolean useTransitions)<br>   at System.Windows.Controls.Primitives.ButtonBase.ChangeVisualState(Boolean useTransitions)<br>   at System.Windows.Controls.Primitives.ToggleButton.ChangeVisualState(Boolean useTransitions)

The XAML I'm using for the RadTileView is as follows:

<telerik:RadTileView ItemsSource="{Binding FieldViewModels}"/>

Where FieldViewModels is a IReactiveList.

I've searched the solution for RestoreIcon1 and can't find anything, so I can only guess that it's something in the RadTileView itself? Has anyone else had this problem? Can anyone think of a solution?

Martin
Telerik team
 answered on 20 Apr 2016
2 answers
321 views

Hello,

 

I am working on a gridview with a contextmenu.

For the comboboxes in the gridview I want to add an additional menuitem (beside Add/Delete etc.). In that case I want to do a search on the item thats currently selected in the combobox. I wired up the command to it which works fine, I am now stuck with getting the selected value from the combobox.

I want to use this value to show in my contextmenu, for example "Search Item X", where Item X is the name of the selected item in the combobox, I also want to pass the selected item to my command so I can do the actual search.

I created the code below, but I am getting a binding error stating that SelectedValue can not be found on the GridViewCell. How do I bind to the combobox inside the cell?

<ContextMenu x:Key="frsvGridComboContextMenuArtikelGroep" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
 
    <!-- Search menu-item-->
    <MenuItem CommandParameter="{Binding Parent.PlacementTarget.SelectedValue, RelativeSource={RelativeSource Self}}"
            Command="{Binding DataContext.SearchArtikelGroepCommand, Source={StaticResource subViewSpy}}" DataContext="{Binding}">
        <MenuItem.Icon>
            <Image Source="/Resources.Icons;Component/16x16/search16.png"/>
        </MenuItem.Icon>
        <MenuItem.Header>
            <MultiBinding Converter="{StaticResource frsvSelectedValueToStringMultiValueConverter}">
                <Binding>
                    <Binding.Source>
                        <sys:String>Filter op</sys:String>
                    </Binding.Source>
                </Binding>
                <Binding Path="PlacementTarget.Text"
        RelativeSource="{RelativeSource  AncestorType=ContextMenu}" />
                <Binding>
                    <Binding.Source>
                        <sys:String>...</sys:String>
                    </Binding.Source>
                </Binding>
            </MultiBinding>
        </MenuItem.Header>
    </MenuItem>
</ContextMenu>

 

Any help would be appreciated.

 

Regards,

 

Marcel

Martin
Telerik team
 answered on 20 Apr 2016
3 answers
550 views

I am using implicit styles and want to display a custom error template for RadCombobox. This is my style, It was working fine when i was not using implicit styles, but after that when ever there is an error it display the default telerik error template a red border with tooltip at right top corner.

 

<telerik:RadComboBox Width="260" ItemsSource="{Binding Policies}" DisplayMemberPath="Name" 
                                 SelectedItem="{Binding SelectedPolicy, NotifyOnValidationError=True}"/>

<Style TargetType="{x:Type telerik:RadComboBox}" BasedOn="{StaticResource RadComboBoxStyle}">
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="True">
                <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
                <Setter Property="BorderBrush" Value="Red"/>
                <Setter Property="Validation.ErrorTemplate">
                    <Setter.Value>
                        <ControlTemplate>
                            <DockPanel>
                                <TextBlock Foreground="Red" Text="{Binding [0].ErrorContent}" TextTrimming="WordEllipsis" DockPanel.Dock="Bottom" />
                                <AdornedElementPlaceholder/>
                            </DockPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

Vikas
Top achievements
Rank 1
 answered on 20 Apr 2016
2 answers
246 views

Hi,

We have a situation where we have the RadGridView with ComboBoxes in two of its columns. There are two Text columns as well.

If the mouse is kept over a combo box column and the mouse scroll is used, the Grid scroll bar does not fire but the combo box changes selection. However if the mouse is kept above a Text column cell and the mouse scroll is used, the grid scroll bar works as usual. We don't want this disparity. We want the grid scroll bar to work even if the mouse is kept over the radcombobox column cell.

Another challenge is the version of Telerik.Windows.Controls.GridView.dll that we have in our project is 2011.1.0419.35.

I have tried to play with by hooking the OnPreviewMouseWheel event of the RadComboBox that resides in the grid cell. But seems it still makes the combo box scroll.

 

01.private void CboPreference_OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
02.       {
03.           var comboBox = sender as RadComboBox;
04.           if (comboBox != null)
05.           {
06.               if (grdTraderPreferences != null)
07.               {
08.                   //Copy over event arg members and raise it
09.                   var newarg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
10.                   {
11.                       RoutedEvent = RadGridView.PreviewMouseWheelEvent,
12.                       Source = sender
13.                   };
15.                   grdTraderPreferences.RaiseEvent(newarg);
16.               }
17.           }
18.       }

Any help will be appreciated.

 

regards,

J

James
Top achievements
Rank 1
 answered on 20 Apr 2016
1 answer
98 views

Hi,

We have a situation where we have the RadGridView with ComboBoxes in two of its columns. There are two Text columns as well.

If the mouse is kept over a combo box column and the mouse scroll is used, the Grid scroll bar does not fire but the combo box changes selection. However if the mouse is kept above a Text column cell and the mouse scroll is used, the grid scroll bar works as usual. We don't want this disparity. We want the grid scroll bar to work even if the mouse is kept over the radcombobox column cell.

Another challenge is the version of Telerik.Windows.Controls.GridView.dll that we have in our project is 2011.1.0419.35.

I have tried to play with by hooking the OnPreviewMouseWheel event of the RadComboBox that resides in the grid cell. But seems it still makes the combo box scroll.

 

var comboBox = sender as RadComboBox;
            if (comboBox != null)
            {
                if (grid != null)
                {
                    //Copy over event arg members and raise it
                    var newarg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
                    {
                        RoutedEvent = RadGridView.PreviewMouseWheelEvent,
                        Source = sender
                    };
                    e.Handled = true;
                    grid.RaiseEvent(newarg);
                }
            }

Any help will be appreciated.


regards,
J
Dilyan Traykov
Telerik team
 answered on 20 Apr 2016
2 answers
66 views

I think I came across a bug regarding the WorkbookContentChanged event. It is fired every time I change a cell, until I use the "drag cell value" feature, and then it seems to be fired only when a new worksheet is created, there are no notifications when a cell is changed (even in newly created worksheets).

 

PS: I've created a simple example application but I seem unable to upload .7z files. If you still want it, I'll paste the source in a post

 

Nikolay Demirev
Telerik team
 answered on 20 Apr 2016
11 answers
225 views
Hi,

I'm using PivotGrid with LocalDataSourceProvider.
I'm defining RowGroupDescriptions and wanna that are collapsed in PivotGrid by default.

How can I achieve this?

Regards, Getulio.
Polya
Telerik team
 answered on 20 Apr 2016
1 answer
164 views

Hello,

I have the following TreeListView.

<telerik:RadTreeListView
  AutoExpandItems="{Binding IsToggleExpand}"
  IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}"

 

  ItemsSource="{Binding FolderDataView}"
  IsFilteringAllowed="True"
  SelectedItem="{Binding SelectedItem}"
 
  EnableRowVirtualization="True"
  EnableColumnVirtualization="True"
  ValidatesOnDataErrors="InEditMode"
  VirtualizingPanel.IsVirtualizing="True"
  ScrollViewer.VerticalScrollBarVisibility="Visible">

I use IsExpanded/IsExpandedBinding to open a node and I use IsToggleExpand/AutoExpandItems to open all nodes. Everything works correct.

If I reopen my Tree I have to expand all nodes of the last session. So I store the expand state when closing and use IsExpanded to open the nodes when opening. If I open many nodes it is very slow (flickering). And the ScrollViewer does not recalc its correct size. Perhaps the UI refreshes too often.

If I expand all nodes with IsToggleExpand/AutoExpandItems it is much faster and the ScrollViewer resizes correctly.

How can I improve the user experience and the performance when opening many nodes?

 

Dilyan Traykov
Telerik team
 answered on 20 Apr 2016
2 answers
113 views

We're looking at using the RadRichTextBox in our application. For testing, I have a very simple docx with 2 mergefields

1. One mergefield in the header of the docx

2. One mergefield in the body of the docx.

 

When loading the .docx using your sample(SaveAndSaveAs_WFP) , the mergefield in the body appears but the mergfield in the header does not.

How can this be resolved? Is this a settings issue?

Thanks

 

 

Boby
Telerik team
 answered on 20 Apr 2016
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?