Telerik Forums
UI for WPF Forum
0 answers
210 views

Hi!

I have been using Test Studio in 2 days, so far Its working fine on WPF project. But I get into a problem. In our WPF project, we have a part web site for login. Seems like teststudio doesn’t recognize whatever happends inside the red markings (see the image)  as that is website part in our WPF project.

1. Is there any way around this problem?

2. I suppose I also need to login first to run other testes in Wpf project. Or Can I somehow connect to running Wpf Application to execute other recorded tests without login part.

 

 

 

 

Sheerin
Top achievements
Rank 1
 asked on 03 Aug 2017
5 answers
235 views

Hi Every Body…

I use RadRichTextBox control, and my requirement is to add border to every page in the document, like that shown in the attached image.

As RadRichTextBox control doesn't support adding shapes, I tried using DecorationUILayerBase, but unfortunately I couldn't use it with the headers (to achieve my requirement).

So I tried another technique utilizing InlineUiContaineers, where I created the required structure (including the require border) and added them to a Grid control, then adding that Grid to an instance of InlineUIContainer class, and adding that instance to the header section of an instance of RadDocument class, and finally setting that instance to the Document property of my RadRichTextBox control.

This solution worked for the header of the first page only, but as the user continues writing and reaching end of this first page and new page is added the following error is thrown:
"Specified element is already the logical child of another element. Disconnect it first."

My code snippet is as the following:

Me.radRichTextBox.Document = CreateDocumentWithCustomHeader()
Public Function CreateDocumentWithCustomHeader() As RadDocument
            Dim doc As New RadDocument()
            doc.LayoutMode = DocumentLayoutMode.Paged

            Dim headerDoc As New RadDocument()
            Dim hSection As New Section()
            headerDoc.Sections.Add(hSection)
            headerDoc.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(5, 5, 5, 5)

            Dim hparagraph As New Paragraph()
            hSection.Blocks.Add(hparagraph)

            Dim grid As New Grid
            Dim column1 As New ColumnDefinitionWith {.Width = NewGridLength(150)}
            Dim column2 As New ColumnDefinitionWith {.Width = NewGridLength(0, GridUnitType.Star)}
            Dim column3 As New ColumnDefinitionWith {.Width = NewGridLength(150)}
            grid.ColumnDefinitions.Add(column1)
            grid.ColumnDefinitions.Add(column2)
            grid.ColumnDefinitions.Add(column3)
            Dim MinistryImage As New Image
            MinistryImage.Source = BitmapManager.CreateBitmapImage("pack://application:,,,/Images/ Logo1.png", 150)
            Dim LogoImage As New Image
            LogoImage.Source = BitmapManager.CreateBitmapImage("pack://application:,,,/Images/Logo2.png", 150)
            grid.SetColumn(LogoImage, 0)
            grid.SetRow(LogoImage, 0)
            grid.SetColumn(MinistryImage, 2)
            grid.SetRow(MinistryImage, 0)
            grid.Children.Add(LogoImage)
            grid.Children.Add(MinistryImage)
            Dim border As New Controls.BorderWith {.BorderThickness = New Thickness(4), .CornerRadius = New CornerRadius(5), .BorderBrush = New SolidColorBrush(Colors.Black)}
            grid.SetColumn(border, 0)
            grid.SetRow(border, 0)
            grid.SetColumnSpan(border, 3)
            grid.Children.Add(border)
            border.HorizontalAlignment = Windows.HorizontalAlignment.Stretch
            border.VerticalAlignment = Windows.VerticalAlignment.Stretch
            border.Margin = New Thickness(5, 5, 5, -500)

            grid.HorizontalAlignment = Windows.HorizontalAlignment.Stretch
            grid.VerticalAlignment = Windows.VerticalAlignment.Stretch

            Dim container As New InlineUIContainer()
            container.UiElement = grid
            container.Height = 150
            container.Width = 700
            hparagraph.Inlines.Add(container)

            Dim header As New Header()
            header.Body = headerDoc

            Dim section As New Section()
            section.Headers.Default = header
            doc.Sections.Add(section)
            doc.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(10, 10, 10, 10)

            Return doc
        End Function

Tanya
Telerik team
 answered on 02 Aug 2017
2 answers
478 views

Hi,

I am trying to apply background color to particular GridViewDataColumn in RadTreeListView.If I directly set the background color it is working fine, but when I use CellStyle Parameter and set the style it is not working and data also not populating once CellStyle Parameter is given.

 

 Xaml Code realted  to GridViewDatacolumn as below

   <telerik:RadTreeListView.Columns>

<telerik:GridViewDataColumn Width="*" ShowFilterButton="False" Header="Action Descriptor"
                                                    IsReadOnly="True"  CellStyle="{StaticResource cellStyleTemplate}"
                                                    DataMemberBinding="{Binding DataContext,RelativeSource={RelativeSource Self}  ,Converter={StaticResource NodeToDisplayNameConverter}}"  >

   </telerik:RadTreeListView.Columns>

 

Template used 

   <Style x:Key="cellStyleTemplate" TargetType="telerik:GridViewCell">
            <Setter Property="Background" Value="Red"/>
        </Style>

 

Regards,

Nagasree

 

Dharmavaram
Top achievements
Rank 1
 answered on 02 Aug 2017
2 answers
150 views

Hello,

Value was either too large or too small for an Int32 when I type a long number.

Any Idea to handle that?

Version: 2016.3.914.45

Thnaks in advance for your help.

 

 

geCode
Top achievements
Rank 1
 answered on 01 Aug 2017
1 answer
169 views

Hello,

 

I'm using Telerik 2016.3.1024.45

I figure out how to save the layout with your documentation and I have now the xml of the layout

But when I tried to use LoadFromXmlString with the xml it did nothing and the layout stays empty

 

So I thought that my xml wasn't good and I took the one from your example and it didn't work either.

 

Here the xml I tried to load (it's your sample)

<?xml version="1.0" encoding="utf-8"?>
<RadLayoutControl Type="Telerik.Windows.Controls.RadLayoutControl" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SerializationId="myLayoutControlID" Orientation="Horizontal" IsAutoGenerated="false" IsInEditMode="false">
  <Items>
    <Button Type="System.Windows.Controls.Button" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SerializationId="buttonID_1" />
    <Border Type="System.Windows.Controls.Border" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SerializationId="buttonID_2" />
    <LayoutControlGroup Type="Telerik.Windows.Controls.LayoutControlGroup" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SerializationId="layoutGroup_1" Orientation="Vertical" IsAutoGenerated="false">
      <Items>
        <TextBlock Type="System.Windows.Controls.TextBlock" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" SerializationId="txtBlock_1" />
        <LayoutControlGroup Type="Telerik.Windows.Controls.LayoutControlGroup" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" SerializationId="layoutGroup_2" Orientation="Vertical" IsAutoGenerated="false">
          <Items>
            <TextBlock Type="System.Windows.Controls.TextBlock" Width="NaN" Height="NaN" MinWidth="0" MinHeight="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SerializationId="txtBlock_2" />
          </Items>
        </LayoutControlGroup>
      </Items>
    </LayoutControlGroup>
  </Items>
</RadLayoutControl>

 

And I use this to load the xml :

LayoutControl.LoadFromXmlString(@"<xml_here>");

 

Can you help me please ?

 

Thank You

Hervouet Thomas

Thomas
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 01 Aug 2017
9 answers
188 views
Hello,
I've encountered a small bug with gridview rendering when using programmatic grouping.  I've got a gridview that does not display the group panel.  Instead, the user is given the option to group by a single predefined column by clicking a checkbox.  The handlers for the checkbox contain the following simple code:
private void cbxGroupByRegion_Checked(object sender, RoutedEventArgs e)
{
    RadGridView grdView = this.MyGrid;
    
    grdView.GridLinesVisibility = GridLinesVisibility.None;
    grdView.GroupDescriptors.Add(new ColumnGroupDescriptor()
    {
        Column = grdView.Columns["Region"],
        SortDirection = ListSortDirection.Ascending
    });
    grdView.ExpandAllGroups();
}
 
private void cbxGroupByRegion_Unchecked(object sender, RoutedEventArgs e)
{
    RadGridView grdView = this.MyGrid;
     
    grdView.GridLinesVisibility = GridLinesVisibility.Horizontal;
    grdView.GroupDescriptors.Clear();
}

The first time the grid is loaded, it is grouped by default and all rows display correctly.  However, on subsequent groupings, i.e., when unchecking then re-checking the checkbox, the gridview is only partly-filled with rows leaving a blank space at the bottom.  Once the user starts to scroll, the remaining rows suddenly appear.  Has anyone else encountered this?

Thanks..



Dilyan Traykov
Telerik team
 answered on 31 Jul 2017
3 answers
450 views

Greetings,

i just tried to bind my observable collection object (some simple properties and a array) on the RadGridView but i don't figured out how to bind the inner array to the grid.

The array just contains a dynamic int property and i'm using MVVM.

 

thanks!

 

 

 

Dilyan Traykov
Telerik team
 answered on 31 Jul 2017
6 answers
545 views
Hi,

I'm using a RadGridView in my WPF projet and when I load my form, I assign the ItemsSource property of my RadGridView to an object representing an array of values. After that, I'm trying to display a label with the number of items in my grid but the RadGridView.Items.Count method always return 0.

Here is what I'm doing:

RadGridView.ItemsSource; = itemsGrid //Actually, itemsGrid contain 11 elements
GroupBox.Header = RadGridView.Items.Count.ToString(); //Always return 0.

But I can see the 11 elements in my grid!!!
Can you explain this???

Thank's
Dilyan Traykov
Telerik team
 answered on 31 Jul 2017
1 answer
186 views

Hello,

I've implemented TreeViewDragDropBehavior for TreeListView by using the sample code from Telerik UI for WPF Demo and it's work.

But when I added the TreeListView into a RadControlLayout, drag/drop events seems stop working. TreeViewDragDropBehavior.OnDragInitialize was fired but nothing happed afterward.

Any workaround about this?

Thanks.

Martin Ivanov
Telerik team
 answered on 31 Jul 2017
1 answer
294 views

Hello. In View that is inside Prism Module in MVVM multimodule Prism application I have the following XAML line:

<Style TargetType="telerik:SplineSeries" BasedOn="{StaticResource SplineSeriesStyle}">

SplineSeriesStyle resource could not be resolved. Herewith "BasedOn="{StaticResource SplineSeriesStyle}" substring is underlined by a blue wavy line. When I move the mouse cursor to this underlined substring then "SplineSeriesStyle resource could not be resolved" error message is displayed. I use Prism UserControl as the View where abovementioned XAML is placed. Below is XAML of the View with some reductions:

<UserControl x:Class="Telecom.Flowmeter.Modules.MeterReading.Views.MeterReadingView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:prism="http://prismlibrary.com/"
             Style="{StaticResource CommonViewStyle}"
             prism:ViewModelLocator.AutoWireViewModel="True"
             xmlns:views="clr-namespace:Telecom.Flowmeter.Modules.MeterReading.Views"
             xmlns:c="clr-namespace:Telecom.Flowmeter.Modules.MeterReading.Converters"
             mc:Ignorable="d">
 
    <FrameworkElement.Resources>
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
        <!--Шаблон, определяющий представление окна графика измеряемого параметра-->
        <DataTemplate x:Key="ContentTemplate">
            <Grid>
                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                <Grid>
                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 
                    <!--Series color visualizer-->
                    <telerik:RadLegend Grid.Row="0" Grid.Column="1" Items="{Binding LegendItems, ElementName=splineAbsoluteChart}" HorizontalAlignment="Right" VerticalAlignment="Top"
                           Visibility="{Binding IsAbsoluteSplineChartVisible}"/>
                    <!--Spline chart-->
                    <telerik:RadCartesianChart x:Name="splineAbsoluteChart" Grid.Row="0" Grid.Column="0" Visibility="{Binding IsAbsoluteSplineChartVisible}" Palette="{StaticResource customPalette}">
                        <!--Turn vertical and horizontal scrollbars off-->
                        <telerik:RadCartesianChart.Resources>
                            <Style TargetType="telerik:PanZoomBar">
                                <Setter Property="Visibility" Value="Collapsed"/>
                            </Style>
                        </telerik:RadCartesianChart.Resources>
                        <!--X axis-->
                        <telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:DateTimeContinuousAxis MajorStepUnit="Second" LabelInterval="5" LabelFormat="hh:mm:ss" FontFamily="Segoe UI" PlotMode="OnTicks" TickOrigin="{Binding AlignmentDate}"/>
                        </telerik:RadCartesianChart.HorizontalAxis>
                        <!--Y axis---->
                        <telerik:RadCartesianChart.VerticalAxis>
                            <telerik:LinearAxis FontFamily="Segoe UI" Title="{Binding Title_Y}" />
                        </telerik:RadCartesianChart.VerticalAxis>
                        <!--Layout grid-->
                        <telerik:RadCartesianChart.Grid>
                            <telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineDashArray="3,4" MajorYLineDashArray="3,4"/>
                        </telerik:RadCartesianChart.Grid>
                        <!--Series provider-->
                        <telerik:RadCartesianChart.SeriesProvider>
                            <telerik:ChartSeriesProvider Source="{Binding SeriesData}">
                                <telerik:ChartSeriesProvider.SeriesDescriptors>
                                    <telerik:CategoricalSeriesDescriptor CategoryPath="Category" ValuePath="Value" ItemsSourcePath="ChartPoints">
                                        <telerik:CategoricalSeriesDescriptor.TypeConverter>
                                            <c:SeriesTypeConverter/>
                                        </telerik:CategoricalSeriesDescriptor.TypeConverter>
                                        <!--Visualize series on the computer screen-->
                                        <telerik:CategoricalSeriesDescriptor.Style>
                                            <!-- !!! THE NEXT LINE IS THE PROBLEM ONE !!! -->
                                            <Style TargetType="telerik:SplineSeries" BasedOn="{StaticResource SplineSeriesStyle}">
                                                <!--Marks and naming of the series-->
                                                <Setter Property="LegendSettings" Value="{Binding  SeriesName, Converter={StaticResource StringToLegendSettingsConverter}}"/>
                                                <!--Each series thickness-->
                                                <Setter Property="StrokeThickness" Value="2"/>
                                            </Style>
                                        </telerik:CategoricalSeriesDescriptor.Style>
                                    </telerik:CategoricalSeriesDescriptor>
                                </telerik:ChartSeriesProvider.SeriesDescriptors>
                            </telerik:ChartSeriesProvider>
                        </telerik:RadCartesianChart.SeriesProvider>
                        <!--Behaviors-->
                        <telerik:RadCartesianChart.Behaviors>
                            <telerik:ChartPanAndZoomBehavior DragMode="Pan" ZoomMode="Both"  PanMode="Both"/>
                        </telerik:RadCartesianChart.Behaviors>
                    </telerik:RadCartesianChart>
                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                </Grid>
            </Grid>
        </DataTemplate>
    </FrameworkElement.Resources>
 
    <Grid>
        <telerik:RadTileView PreservePositionWhenMaximized="True" MinimizedColumnWidth="150" ItemTemplate="{StaticResource ItemTemplate}"
                             ContentTemplate="{StaticResource ContentTemplate}" ItemsSource="{Binding MeasuredParameterCharts}"/>
    </Grid>
</UserControl>

The Shell in my application is standart WPF window (!!! not telerik:RadWindow !!!). This is dictated by the requirements of the technical assignment for the application. There are no Telerik references in Shell project in the solution. But the Prism Module (where abovementioned XAML is located) has the following Telerik references: Telerik.Windows.Controls, Telerik.Windows.Controls.Chart, Telerik.Windows.Controls.Navigation and Telerik.Windows.Data. The version of all these DLLs is 2017.1.117.40. In the solution, Shell project is in different folder then Prism Module projects are. Why SplineSeriesStyle resource could not be resolved? Please help.

Martin Ivanov
Telerik team
 answered on 31 Jul 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?