Telerik Forums
UI for WPF Forum
7 answers
527 views

I have a list of objects loaded into a RadGridView where the objects have a property that is a List<string>. This list is pulled from a list of possible values. 

 

class myTableItem{
    public int itemID {get;set;}
    public string name {get;set;}
    public List<string> tagList {get;set;}
}

 

What I would like to do is create a filter that displays a checkbox list of all possible tag values, and any item in the table whose tagList contains any of the values selected in filter will get displayed.

 

How would I do this? Is this something I need to create a custom filter for?

Stefan
Telerik team
 answered on 27 Jun 2017
1 answer
161 views
I've integrated the RadDiagram html export example from the WPF UI demos in my project. Now I would like to implement a tooltip when hovering over an connection path in the generated svg. In the cs sourcecode file a "tooltip" div with an "contentLabel" is added, but it is never used. Does someone have a working tooltip example that I could use?
Dinko | Tech Support Engineer
Telerik team
 answered on 27 Jun 2017
8 answers
244 views
Below is a simple docking application. After the app loads I tear out the panels and dock them together into a single floating window. I end up with a floating tabbed window with several tabs. If I press the close button of the floating panel the entire floating panel and all the tabbed items in it close. How would I get this to only close the active item in the tabbed view instead of all the items and the panel? E.g. if the floating panel has tabs for A, B and C, and B is active when I press close, then the panel would remain floating with tabs A and C still present. 

<Window
        xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="RadControlsDocking.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
 
        <telerikDocking:RadDocking>
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadDocumentPane Header="A"/>
                        <telerikDocking:RadDocumentPane Header="B"/>
                        <telerikDocking:RadDocumentPane Header="C"/>
                        <telerikDocking:RadDocumentPane Header="D"/>
                        <telerikDocking:RadDocumentPane Header="E"/>
                        <telerikDocking:RadDocumentPane Header="F"/>
                        <telerikDocking:RadDocumentPane Header="G"/>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
            </telerikDocking:RadDocking.DocumentHost>
        </telerikDocking:RadDocking>
 
    </Grid>
</Window>
Martin Ivanov
Telerik team
 answered on 27 Jun 2017
6 answers
547 views
Hello,

I'd like to move the contents of a selected row's single cell up or down with in the grid based on the user clicking an up or down button.
In the below example row 3 is selected and the user has clicked the UP button. The result shows that the LABEL data for row 2 and row 3 have been switched. I'd also like to move the selected row in the direction indicated with the button push. In this case the selected row moves from row 3 to row 2.

Thanks, G

EXAMPLE:          RESULT:

#     Label            #     Label    
1     1                   1     1
2     2                   2     3
3     3                   3     2
4     4                   4     4
Martin Ivanov
Telerik team
 answered on 27 Jun 2017
1 answer
158 views

Hi!

I've been browsing the forum looking for an answer to my problem and found this one: http://www.telerik.com/forums/get-recurrence-appointments-by-timespan.

What I gather from the first part of that thread is that if I want to show the appointments for the week of, say, july 8th -july 14th next year, and populate it with the occurrences produced by an main appointment starting this week, I still have to find this main appointment to figure out what occurrences to show...

Is there some preferred strategy to do this suggested by previous experiences, other than just browse my whole appointments database and check each and every one having a recurrence pattern to see if I should show its occurrences?

 

Thanks in advance!

 

Miguel Pinkas

Richard
Top achievements
Rank 1
Iron
 answered on 26 Jun 2017
2 answers
125 views

I am trying to have 4 RadPanes in my control arranged in a 2x2 grid that are even height and width. The problem is, that I can't get the height to be the same across the RadSplitContainers. When the control is first opened, the top 2 RadPanes are much shorter than the bottom 2. Is there a way to get them to be equal?

Here is my code:

 

<telerikDocking:RadDocking Name="radDock" HasDocumentHost="False" telerik:AnimationManager.AnimationSelector="{x:Null}" telerik:AnimationManager.IsAnimationEnabled="False" MouseDoubleClick="RadDocking_MouseDoubleClick" >
            <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedTop">
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane >
                        <controls:SpreadView Margin="5,5,5,5" />                        
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane >
                        <controls:SpreadView Margin="5,5,5,5" />                        
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
            <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
                <telerikDocking:RadPaneGroup >
                    <telerikDocking:RadPane >
                        <controls:SpreadView Margin="5,5,5,5" />                        
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup >
                    <telerikDocking:RadPane >
                        <controls:SpreadView Margin="5,5,5,5" />
                    </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
        </telerikDocking:RadDocking>

David
Top achievements
Rank 1
 answered on 26 Jun 2017
1 answer
198 views

Hi,

 

I'm trying to create an horizontal bar chart with labels inside the bars, close the to right side of the bars, line in labels-inside.png. I have tried several things but the closest I could get to it was the labels right after the bars (see labels-outside.png). 

 

How can I get the labels inside the bars close to the right edge? Is it possible?

 

Thanks,

 

Luis Barreira

Cleanwatts
Top achievements
Rank 1
 answered on 26 Jun 2017
4 answers
204 views

I've been using ChartView for some time to create charts from a Windows service without problems. The chart control (RadCartesianChart or RadPieChart) is created and initialized in code, and then is rendered to a bitmap.

Ever since I updated the libraries to the latest version, when I try to create a pie chart, the result is always a blank image. The other chart types continue to work as expected.

The code I'm using is the following:

 

private bool CreatePieChartThread(MemoryStream stream, int width, int height)
{
    RadPieChart chart = new RadPieChart
                    {
                        Palette = BuildColorPalette(m_chartColors),
                        SmartLabelsStrategy = new PieChartSmartLabelsStrategy
                                          {
                                              DisplayMode = PieChartLabelsDisplayMode.SpiderAlignedOutwards
                                          }
                    };
 
    var labelBoxFactory = new FrameworkElementFactory(typeof(TextBlock));
    labelBoxFactory.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Center);
    labelBoxFactory.SetBinding(TextBlock.TextProperty, new Binding("Label"));
 
    var valueBoxFactory = new FrameworkElementFactory(typeof(TextBlock));
    valueBoxFactory.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Center);
    valueBoxFactory.SetBinding(TextBlock.TextProperty, new Binding("Value"));
 
    var panelFactory = new FrameworkElementFactory(typeof(StackPanel));
    panelFactory.SetValue(StackPanel.OrientationProperty, Orientation.Vertical);
    panelFactory.AppendChild(labelBoxFactory);
 
    if (m_showValuesOnPie)
        panelFactory.AppendChild(valueBoxFactory);
 
    PieSeries series = new PieSeries
                   {
                       ShowLabels = true,
                       RadiusFactor = 0.75,
                       AngleRange = new AngleRange(-90, 360),
                       LabelConnectorsSettings = new ChartSeriesLabelConnectorsSettings()
                   };
    series.LabelDefinitions.Add(new ChartSeriesLabelDefinition
                            {
                                Margin = new Thickness(-8, 0, 0, 0),
                                Template = new DataTemplate { VisualTree = panelFactory }
                            });
 
    // valores ordenados por nome e sem zeros
    foreach (var value in m_data.Where(d => d.AlarmOccurrences > 0).OrderBy(d => d.Name))
    {
        series.DataPoints.Add(new PieDataPoint
                          {
                              Label = value.Name,
                              Value = value.AlarmOccurrences,
                              OffsetFromCenter = 0.05,
                          });
    }
 
    chart.Series.Add(series);
 
    PrepareElementForExport(chart, width, height);
    ExportExtensions.ExportToImage(chart, stream, new PngBitmapEncoder());
 
    return true;
}
 
protected void PrepareElementForExport(FrameworkElement element, int width, int height)
{
    if (!element.IsInitialized)
    {
        element.BeginInit();
        element.EndInit();
    }
 
    element.Measure(Size.Empty);
    element.Measure(new Size(width, height));
 
    element.Dispatcher.Invoke(() => { });
 
    element.Arrange(new Rect(0, 0, width, height));
    element.UpdateLayout();
}

Cleanwatts
Top achievements
Rank 1
 answered on 26 Jun 2017
2 answers
436 views

Hello I have a problem selecting rows in a Radgrid with TOUCHSCREEN. At the start, one row is selected (the blue one, as you can see in the screenshot), but when I click on another row nothing happens (I just see small little circus that I'm tapping on the screen). Everythings works fine if I use a mouse attached to the tablet but doesn't work if I use finger on touchscreen. The desired result is that the row "touched" becomes blue and is the SelectedItem="{Binding SelectedItuGrid.

Just to let you know that the radiobutton and the Button X works with touch after I added this instruction:  telerik:TouchManager.IsTouchHitTestVisible ="False"   

 

This is the XAML code:

<StackPanel Grid.Row="4" telerik:TouchManager.IsTouchHitTestVisible ="False" >
                            <telerik:RadGridView x:Name="radGridUti"
                            SelectedItem="{Binding SelectedItuGrid, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"                                
                            telerik:TouchManager.IsTouchHitTestVisible ="False"   
                            telerik:ScrollingSettingsBehavior.IsEnabled="True"
                            IsReadOnly="True"
                            SelectionMode="Single"                         
                            SelectionUnit="FullRow"                                                  
                            ShowColumnSortIndexes="False"                                
ItemsSource="{Binding ItusSameGroupList, Mode=TwoWay}"                            
                            Visibility="{Binding GridItusSameGroupVisibility}"
                            Margin="0,10,0,10" >
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn t:I18N.Translate="ITU Id" DataMemberBinding="{Binding UtiId}" Width="0" IsVisible="False" />
                                    <telerik:GridViewDataColumn t:I18N.Translate="ITU Plate" DataMemberBinding="{Binding UtiPlate}" Width="3*" />
                                    <telerik:GridViewDataColumn t:I18N.Translate="Ground" Width="3*" HeaderTextAlignment="Center">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <RadioButton Content="{Binding RadioButtonGround}" GroupName="{Binding UtiPlate}"
                                                            HorizontalAlignment="Center"                                                         
                                                            IsChecked="{Binding IsUtiInDoubleStakerHold, 
                                                            Converter={StaticResource EnumBoolConverter}, 
                                                            ConverterParameter={x:Static views:UtiGroundUpper.Ground}, Mode=TwoWay}"
                                                            IsEnabled="{Binding IsUtiInDoubleStakerHold, 
                                                            Converter={StaticResource EnumBoolConverter}, 
                                                            ConverterParameter={x:Static views:UtiGroundUpper.Disabled}}" />
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                    <telerik:GridViewDataColumn t:I18N.Translate="Upper" Width="3*" HeaderTextAlignment="Center">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <RadioButton Content="{Binding RadioButtonUpper}" 
                                                            HorizontalAlignment="Center"
                                                            GroupName="{Binding UtiPlate}"
                                                            IsChecked="{Binding IsUtiInDoubleStakerHold, 
                                                            Converter= {StaticResource EnumBoolConverter}, 
                                                            ConverterParameter={x:Static views:UtiGroundUpper.Upper}, Mode=TwoWay}"
                                                            IsEnabled="{Binding IsUtiInDoubleStakerHold, 
                                                            Converter={StaticResource EnumBoolConverter}, 
                                                            ConverterParameter={x:Static views:UtiGroundUpper.Disabled}}" />
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                    <telerik:GridViewDataColumn Width="1*" HeaderTextAlignment="Center">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button 
                                                        HorizontalAlignment="Center"                                          
                                                        Visibility="{Binding Path=DeleteCommandIsVisible, Converter={StaticResource BoolToVis}, Mode=TwoWay}"
                                                        Command="{Binding Path=DataContext.ConfirmDeleteViewCommand,
                                                    RelativeSource={RelativeSource Mode=FindAncestor,      
                                                     AncestorType={x:Type UserControl}} }" 
                                                    CommandParameter="{Binding}" 
                                                        Background="Transparent"
                                                        BorderBrush="Transparent"
                                                        Height="50"
                                                        Width="100">
                                                    <fa:ImageAwesome Icon="remove" Foreground="Red" Width="32" Height="32" VerticalAlignment="Center"  
                                                     HorizontalAlignment="Center"/>
                                                </Button>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </StackPanel>

 

Please let me know,

thank you.

 

Serena
Top achievements
Rank 1
 answered on 26 Jun 2017
1 answer
133 views

Hi,

I am very new to Telerik and I am trying us RichTextBox on my project.

One of the requirement is to export text to HTML5 as responsive.

My thinking is that I need to intercept, customize or subclass HtmlFormatProvider to achieve what I want.

Is intercepting, customizing or subclassing HtmlFormatProvider possible?

Or is there a way to create HTML5 in my way?

 

Thanks in advance.

 

Jaeho

Mihail
Telerik team
 answered on 26 Jun 2017
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?