Telerik Forums
UI for WPF Forum
8 answers
228 views
Hello everyone!
How do I change the layout of a specific page of my RadDocument?
Tanya
Telerik team
 answered on 31 Dec 2018
1 answer
284 views

Hello, Yoan.

Yes, as you said, the theme will affect FontSize effect. I set telerik:StyleManager.Theme=“Fluent” , its setting for FontSize is invalid.
So, how can I modify FontSize if I still use the Fluent theme?

Thanks

Yoan
Telerik team
 answered on 28 Dec 2018
2 answers
294 views
Hello,

how can i assign a ControlTemplate in an Icon Property of RadMenuItem ? I have a vectorial image with a Path and i want to put it in an RadMenuItem...

Thanks in advance.
Nuno
Ankesh
Top achievements
Rank 1
 answered on 27 Dec 2018
1 answer
107 views

Hi there,

I'm new, and I'm currently trying to understand how RadDocking works.

Is there any way that I can put RadPanes'  (which is a child inside of a RadDocumentHost) headers in another location?

 

Martin Ivanov
Telerik team
 answered on 27 Dec 2018
2 answers
1.8K+ views
I've been trying to use RadGridView to display a relatively simple list of data.  No grouping, sorting or even selecting of cells allowed.  I tried to customize it to not show any borders or grid lines and use my custom background  but I seem to be unable to get rid of a single vertical line along the left side of the grid.

I've tried to do this by turning off all borders and make all of my backgrounds use the dark background color you can see in the image.  (a static resource brush named "GsBackgroundDark")  I tried to set the default styles of all of the element types that the grid apppears to use (GridViewCell, GridViewHeaderCell, etc).  But clearly I'm missing something.

Can you tell me what else I need to do?

I have attached an image showing you what I see.  What am I missing to get rid of that line on the left?

Below is  the XAML I'm using

<Window x:Class="TestApp.MainWindow"
        mc:Ignorable="d"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:gl="clr-namespace:TestApp"
        xmlns:net="http://schemas.gelsight.com/mobile/net"
        Title="MainWindow"
        >
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Colors.xaml"/>
            </ResourceDictionary.MergedDictionaries>
 
            <gl:MainWindowVm x:Key="ViewModel"/>
 
 
            <Style TargetType="{x:Type tk:GridViewCell}">
                <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="SelectedBackground" Value="{StaticResource GsBackgroundDark2}"/>
                <Setter Property="BorderThickness" Value="0"/>
            </Style>
            <Style TargetType="{x:Type tk:GridViewHeaderCell}">
                <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="0"/>
            </Style>
            <Style TargetType="{x:Type tk:GridViewSearchPanel}">
                <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="0"/>
            </Style>
            <Style TargetType="{x:Type tk:GridViewGroupPanel}">
                <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="0"/>
            </Style>
            <Style TargetType="{x:Type tk:GridViewScrollViewer}">
                <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                <Setter Property="BorderBrush" Value="Transparent"/>
                <Setter Property="BorderThickness" Value="0"/>
            </Style>
        </ResourceDictionary>
    </Window.Resources>
    <Grid DataContext="{StaticResource ViewModel}">
     
        <tk:RadGridView      ItemsSource="{Binding Licenses}"
                        CanUserGroupColumns="False"
                        CanUserSearch="False"
                        Background="{StaticResource GsBackgroundDark}"
                        Foreground="{StaticResource GsForegroundLight}"
                        ColumnsSelectionButtonVisibility="Collapsed"
                        BorderThickness="0"
                        BorderBrush="{StaticResource GsBackgroundDark}"
                        ShowGroupPanel="False"
                        ShowColumnSortIndexes="False"
                        ShowSearchPanel="False"
                        ShowColumnFooters="False"
                        ShowGroupFooters="False"
                        CanUserSelectColumns="False"
                        Padding="0"
                        CanUserResizeColumns="False"
                        CanUserSearchInHiddenColumns="False"
                        DataLoadMode="Asynchronous"
                        Focusable="False"
                        GridLinesVisibility="None"
                        IsFilteringAllowed="False"
                        RowIndicatorVisibility="Collapsed"
                        CanUserSortColumns="False"
                        CanUserReorderColumns="False"
                        AutoGenerateColumns="False"
                        IsHitTestVisible="False"
                        CanUserSelect="False"
                        MaxWidth="500" Style="{DynamicResource RadGridViewStyle1}"  
                        SearchPanelForeground="{StaticResource GsForegroundLight}"
                        SearchPanelBackground="{StaticResource GsBackgroundDark}"
                        ColumnBackground="{StaticResource GsBackgroundDark}"
                        GroupPanelBackground="{StaticResource GsBackgroundDark}"
                        GroupPanelForeground="{StaticResource GsForegroundLight}"
                        AlternateRowBackground="{StaticResource GsBackgroundDark}"
                        >
            <tk:RadGridView.HeaderRowStyle>
                <Style TargetType="{x:Type tk:GridViewHeaderRow}">
                    <Setter Property="Background" Value="{StaticResource GsBackgroundDark}"/>
                    <Setter Property="BorderBrush" Value="Transparent"/>
                    <Setter Property="Foreground" Value="{StaticResource GsForegroundLight}"/>
                    <Setter Property="BorderThickness" Value="0"/>
                    <Setter Property="FontSize" Value="20"/>
                    <Setter Property="FontWeight" Value="Bold"/>
                </Style>
            </tk:RadGridView.HeaderRowStyle>
            <tk:RadGridView.Columns>
                <tk:GridViewDataColumn Header="Feature" Width="Auto" DataMemberBinding="{Binding Feature}" />
                <tk:GridViewDataColumn Header="Version" Width="Auto" DataMemberBinding="{Binding Version}"/>
                <tk:GridViewDataColumn Header="Expires" Width="1*" DataMemberBinding="{Binding Expires}"/>
            </tk:RadGridView.Columns>
        </tk:RadGridView>
    </Grid>
</Window>

Yoan
Telerik team
 answered on 27 Dec 2018
1 answer
106 views

Hello,

I wanted to change the FontSize of RadGridView, but it didn't seem to work. I also wanted to set RowHeaderHeight, but could not find the corresponding attribute value.

How can I change FontSize? How can I set RowHeaderHeight?

Thanks

Yoan
Telerik team
 answered on 27 Dec 2018
2 answers
1.1K+ views

Hello,

I set RadGridView RowHeight to 100, but it doesn't work, it's still small

How can I set the custom rowheight for each row?

Thanks

Yoan
Telerik team
 answered on 27 Dec 2018
1 answer
258 views

Hello,

Now I have purchased Telerik UI for WPF.

I'm trying to set the row height for my RadGridView, but I can't find a RowHeight attribute similar to Microsoft's WPF DataGrid.

How can I set the custom rowheight for each row?

I readed lot of thread on this forum but the properties that they use seems to not exists...

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Dec 2018
9 answers
830 views

Hi Team,

We were previously using the 2017.2.614.45 version of the Telerik controls and were facing memory leak issues with RadGridView. We have hence upgraded to 2018.3.1016.45 version of the controls but still are facing the same memory leak issues. 

We use RadPane which is placed in a RadPaneGroup; the pane in turn contains the RadGridView. We have handled the closed event of the RadPaneGroup wherein we do our cleanup operations(unsubscribing RadGridView events, setting DataContext as null). As stated in one of the forum posts, we also do the cleanup operations advised which is given at the end. 

Please also find the memory profile report of our application when we closed the RadPane. 

Kindly advise.

 

Regards,

Swapnil Ramteke

private void radDocking_Close(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
        {
            try
            {
                if (e.Panes.Count() == 1)
                {
                    var pane = e.Panes.ElementAt(0);
                    if (pane is IDispose)
                    {
                        (pane as IDispose).Dispose();
                    }
 
                    pane.Content = null;
                    pane.Header = null;
                    pane.DataContext = null;
                    pane.RemoveFromParent();
                    pane = null;
                    // Wait for 5 seconds before garbage collection
                    System.Threading.Tasks.Task.Delay(5000).ContinueWith(antecedent =>
                        {
                            GC.WaitForPendingFinalizers();
                            GC.Collect();
                        });
                }
            }
            catch (Exception)
            {
 
            }
        }
Pawel
Top achievements
Rank 1
 answered on 26 Dec 2018
8 answers
267 views

Hi every body ....

I use RadRichTextBox in the following manner: first page is used (by the user) as a cover letter so that it is not included within the total count of pages. Footer of every page except first page should display page number x from y, where x is the current page number (after the first page), and y is the total number of pages minus one (the first page).

I could achieve the first value of the formatted footer using CodeBasedField, but unfortunately I couldn't modify the value returned by NumPagesField.

My question is how to modify value returned by NumPagesField so that I can display total number of pages minus one. Below there is an attachment of an image to show my requirement.

The following is my code snippet used in creating the custom footer:

Public Function FirstTemplate() As RadDocument
Dim section As New Section()
 section.HasDifferentFirstPageHeaderFooter = True
section.Footers.[Default] = New Footer With {.Body = ReportFooter()}
End Function
 
Private Function ReportFooter() As RadDocument
    Dim footerDoc As New RadDocument
Dim footerSection As New Section
            Dim footerParagraph As New Paragraph
            Dim footerDocumentEditor As New RadDocumentEditor(footerDoc)
 
            footerParagraph.TextAlignment = RadTextAlignment.Center
            footerDoc.Sections.Add(footerSection)
            footerSection.Blocks.Add(footerParagraph)
            footerDocumentEditor.InsertField(New FormattedPageNumber, FieldDisplayMode.Result)
            footerDocumentEditor.InsertField(New NumPagesField, FieldDisplayMode.Result) '??? how to return total number of pages -1
 
            Return footerDoc
        End Function
 
Public Class FormattedPageNumber
        Inherits CodeBasedField
        Public Shared ReadOnly FieldType As String = "FormattedPageNUM"
 
        Shared Sub New()
            CodeBasedFieldFactory.RegisterFieldType(FormattedPageNumber.FieldType, Function()
                                                                                       Return New FormattedPageNumber()
                                                                                   End Function)
        End Sub
 
        Public Overrides ReadOnly Property FieldTypeName() As String
            Get
                Return FormattedPageNumber.FieldType
            End Get
        End Property
 
        Protected Overrides Function GetResultFragment() As DocumentFragment
            Dim pageNumber As Integer = 0
            'Dim pagesCount As Integer = 0
            If Me.Document IsNot Nothing Then
                Dim position As New DocumentPosition(Me.Document)
                position.MoveToStartOfDocumentElement(Me.FieldStart)
                Dim sectionBox As SectionLayoutBox = position.GetCurrentSectionBox()
 
                pageNumber = sectionBox.PageNumber
            End If
 
            Dim resultString As String = "Page " & pageNumber - 1 & " From "
 
            Return MyBase.CreateFragmentFromText(resultString)
        End Function
 
        Public Overrides Function CreateInstance() As Field
            Return New FormattedPageNumber()
        End Function
    End Class
Peshito
Telerik team
 answered on 26 Dec 2018
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?