Telerik Forums
UI for WPF Forum
3 answers
444 views

How to change series color for a series as per some range values for different data  points of the same series ? For  example I want to show blue color for data points  between range -10-0 degree celcius , yellow color for data points  between range 0-25 degree celcius & red color for data points for the same series between range 25- 100 degree celcius. I want to do it for BarChart , Polar chart & Radar chart of Telerik WPF controls.

 

https://docs.telerik.com/devtools/winforms/chartview/customization/custom-rendering 

I have demonstrated example described on above link . I just want to same thing with WPF bar chart , polar chart . Please suggest easiest way .

Martin Ivanov
Telerik team
 answered on 10 Jul 2018
3 answers
815 views

I'm trying to using MVVM binding for the pdfviewer but the document always turns out blank.  I'm querying a DB field that contains the bytes of the PDF file and I'm trying to get it to display in the viewer (I've confirmed that the file is not malformed and it displays fine if I save it as a PDF to my desktop).

Here are my MVVM properties:

private RadFixedDocument _currentDocument;
public RadFixedDocument CurrentDocument
{
    get => _currentDocument; set => this.RaiseAndSetIfChanged(ref _currentDocument, value);
}

 

Here is the method I'm using to populate the CurrentDocument property:

var sqlStr = @"select top 1 * from FileManager order by ID desc;";
var file = await con.QuerySingleAsync<FMFile>(sqlStr);
var fileBytes = file.FileContent.ToArray();  // this is type byte[] - I confirmed that it has the correct contents
var ms = new MemoryStream(fileBytes); // ms gets filled properly
FormatProviderSettings settings = new FormatProviderSettings(ReadingMode.AllAtOnce);
PdfFormatProvider provider = new PdfFormatProvider(ms, settings);
CurrentDocument = provider.Import();

 

And here is how my XAML looks:

<telerik:RadPdfViewerToolBar RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}" />
<telerik:RadPdfViewer x:Name="pdfViewer"
                              Grid.Row="1"
                              DocumentSource="{Binding CurrentDocument, Mode=TwoWay}" />

 

However, nothing get's displayed in the viewer.  I confirmed that my VM is hooked up correctly as other property display just fine.  Any advice would be appreciated.

Georgi
Telerik team
 answered on 10 Jul 2018
1 answer
121 views

I have an object with some properties, such as:

public class Result
{
    public DateTime Date { get; set; }
    public Double Temperature { get; set; }
    public Double Humidity { get; set; }
}

 

I would like to have possibility to dynamically change series which I plot at the chart.

Eg. to have ComboBox with string items: "Temperature" and "Humidity" with binding SelectedItems={Binding SelectedSeriesName}
In ViewModel property "SelectedSeriesName"
In chart
<telerik:StepLineSeries ItemsSource="{Binding Results}" ValueBinding="{Binding SelectedSeriesName}" CategoryBinding="Date"/>

of course that is not possible due to ValueBinding must be string.

How can I make this scenario corect?

Martin Ivanov
Telerik team
 answered on 10 Jul 2018
3 answers
197 views

Hi everyone!

I stumbled upon this problem few days ago in one of our applications and I verified the same issue in Telerik demo application too.

In few words, RadRichTextBox can't paste a selection copied from a Google Document bullet list.

To reproduce the issue, simply create a new Google Document and insert a bullet list (single or multi-level, it doesn't matter) then select some bullet elements and copy them in the clipboard.

If you try to paste in a RadRichTextBox control, nothing is gonna be pasted.

As a further indication, I tried some more moves before opening this thread: given that the clipboard has an "HTML Format" data chunk, first I verified that the chunk was visualizable in a browser, and it was.
Then I tried to import it with a HtmlFormatProvider then add the content as a DocumentFragment and the result was that nothing was added.
So I tried to extract the text from the HTML chunk, using a TxtFormatProvider, but the result was an empty string.

I think the two issues are related: nothing is pasted in the editor because the html importer returns an empty content.

I'm looking forward to hear about a possible solution or workaround.

Thanks in advance.
Fabrizio

Peshito
Telerik team
 answered on 10 Jul 2018
4 answers
468 views

Good day, I have a GridView with following style and Theme set to Fluent:

<Style x:Key="TelerikGridViewStyle" TargetType="telerik:RadGridView">
        <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource TelerikTheme}"/>
        <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>
        <Setter Property="AutoGenerateColumns" Value="False"/>
        <Setter Property="IsReadOnly" Value="True"/>
        <Setter Property="CanUserFreezeColumns" Value="False"/>
        <Setter Property="FrozenColumnsSplitterVisibility" Value="Collapsed"/>
        <Setter Property="EnableRowVirtualization" Value="True"/>
        <Setter Property="EnableColumnVirtualization" Value="True"/>
        <Setter Property="ScrollMode" Value="RealTime"/>
        <Setter Property="GroupRenderMode" Value="Flat"/>
        <Setter Property="ShowGroupPanel" Value="False"/>
        <Setter Property="SelectionUnit" Value="FullRow"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="RowHeight" Value="15"/>
</Style>

My grid has a lot of columns, so I enabled horizontal scrollbar to fit all the data. The problem is, my grid would frequently contain only one row, and with current style and Fluent theme it looks good in a normal view with a thin scrollbar (see picture 1), but as soon as my mouse hovers over the scrollbar to scroll to another set of columns, scrollbar expands and becomes so wide it covers that only row of data I have (see picture 2).

Is there any way to keep thin scrollbar style from picture 1 even when using it?

Vicky
Telerik team
 answered on 09 Jul 2018
6 answers
200 views

I am facing problem with column width autoresizing.

I have code like that bellow.

 <RadGridView ItemsSource="{Binding SomeObservableCollection}">

    …

  <RadGridView.Columns>
   <GridViewDataColumn Header="First" DataMemberBinding="{Binding NameSource}" MinWidth="60"/>
   <GridViewDataColumn Header="Second" DataMemberBinding="{Binding ValueSource}" MinWidth="145"/>
  </RadGridView.Columns>

</RadGridView>

Columns auto resizing work well but only in one way. One time the width is increased never until new app start is decreased. I want width fit to content on each column all the time but never be thinner then MinWidth property value.

I have search very much but I have found no solution. For WPF there is not Autoresizing behaviour or Autoresize or BestFit method. Even if I set the Width property programmatically the ActualWidth property value never changes. I definitely call UpdateLayout on RadGridView.

Is there some simple solution?

Thank you very much.

보규
Top achievements
Rank 1
 answered on 08 Jul 2018
2 answers
331 views
I'm using MVVM pattern and would like to create a custom format for DateTimePicker of yyyy-MM-dd, how can I accomplish this? 
rcmp-grc
Top achievements
Rank 1
 answered on 06 Jul 2018
1 answer
170 views

Hello,

I am using the RadTreeView control to give the user a way to arrange and sequence many items, and all of its features have been great for customizing the various ways to interact with the items.  The issue I am currently having is when many items are selected for a drag and drop operation, sometimes upwards of 400 at a time, the drag is very slow to initialize, the drop preview becomes sluggish, and the drop operation itself takes several seconds to complete.  When selecting just a few items (under 30 or so..) there are no noticeable delays.

For my application specifically I use MVVM, and I must use Windows.Forms.Integration.ElementHost since I am plugging into a framework/environment that is not in my control. Both of these factor into performance, but even using the RadTreeView in a standalone WPF application the slowdowns can be observed.

Here is my instance of the treeview to give some context with the settings I am using:

<telerik:RadTreeView
             SelectionMode="Extended"
             IsDragDropEnabled="True"
             IsDragPreviewEnabled="False"
             IsDragTooltipEnabled="True"
             IsDropPreviewLineEnabled="False"
             IsEditable="True"
             Grid.IsSharedSizeScope="True"
             telerik:ScrollingSettingsBehavior.ScrollStep="40"
             telerik:ScrollingSettingsBehavior.ScrollStepTime="00:00:00.01"
             telerik:ScrollingSettingsBehavior.ScrollAreaPadding="40"
             telerik:AnimationManager.IsAnimationEnabled="False"
             IsVirtualizing="False"
             IsExpandOnDblClickEnabled="True">
 
 </telerik:RadTreeView>

 

Do you have any recommendations for what I can change to improve the experience when drag and drop is performed on so many items?

Thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Jul 2018
14 answers
323 views

Dear Telerik-Team!

Basically I came to your site because I want to create an enhanced Class Diagram Designer for my application - and I was amazed by your Diagram editor's capabilities. I saw that you have a basic screenshot for designing entities at http://www.telerik.com/products/wpf/diagrams.aspx.

But unfortunately none of your forum posts, tutorials or examples mentioned that use case.

So I try to lay out what I would like to achive. I'm aiming to create a class designer similar to - but richer than - the Microsoft Visual Studio Class Designer.

The following constraints I have
- Layout/looks should be adaptable (this works with your control from what I have seen)
- workflow as described should be possible to achieve

The workflows are the following:

Scenario one

01CreateClass.png - I would like to create a class
02CreateProperty.png - Add a property to it. Notice that it should be grouped to a region called "Properties"
03NameProperty.png - Specify the name of the property
04NamePropertyEnd.png - Picture shows how it should look like in the end.

Scenario two

05PropertyForEnum.png - Let's add another property called "BookStat"
06EnumCreate.png - Now we create an Enum for that - this should have a different look/shape than a class shape
07AddEnumValue.png - Let's add a value to the Enum
08MakePropertyTypeEnum.png - Now drag a connector from the "BookStat" property to the enum to make it of that type
09PropertyTypeIsEnum.png - A connector should be close to the "BookStat" property connecting to the shape "BookStatus"

Scenario three

10PropertyNoBackReference.png - Create two entities
11PropertyNoBackReferenceAction.png - Drag a connection from the property "Library" of class "Book" to just the class Library.
12PropertyNoBackEnd.png - That means there is no back reference from Library to book. So the connection is put on the shape of "Library" itself

Scenario four

13ReferenceReaderBookStart.png - Create two entities
14ReferenceReaderBookAction.png - Draw the connection from property "Books" of entity "Reader" to property "Reader" of entitiy "Book"
15ReferenceReaderBookEnd.png - This time we have a back reference, so the two properties are converted to a relationship and moved to another region called "Relationships"

Sami
Top achievements
Rank 1
 answered on 05 Jul 2018
2 answers
193 views

Hi, 

I am using RadPropertyGrid in one of my projects. I have a set of dynamic values coming to the RadPropertyGrid. And I am using "PropertyGridDataTemplateSelector" to define datatemplate for each fields of the propertygrid based on the incoming data.

I am able to use Togglebutton and AutoBindBehavior.UpdateBindingOnElementLoaded="IsChecked" on the DataTemplate for boolean Types.

Similarly I want to use a customized usercontrol for a user-defined datatype. So I created a dependency property in the usercontrol and tried to do AutoBindBehavior.UpdateBindingOnElementLoaded="<dependencyProperty>". But it is not working. 

The Datatemplate is working but AutoBindBehavior.UpdateBindingOnElementLoaded="<dependencyProperty>" is not setting anything to the dependencyProperty of the usercontrol.

 

Thanks in advance.

Stefan
Telerik team
 answered on 04 Jul 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?