Telerik Forums
UI for WPF Forum
3 answers
54 views

Hi guys, i have big problem with SplineSeries on RadCartesianChart.

I have DateTimeContinuousAxis on my X axis and LinearAxis on my Y axis.

I want to make average line using SplineSeries but i have problem with drawing it properly.

In attach i created 2 series of data:
LineSeries (BlackLine) and SplineSeries (RedLine)

Both of them are binded to the same collection of data.

And now, i don't know why, SplineSeries go back and then forward, how i can archive line like LineSeries but more rounded? (I Want to SplineSeries go only forward).

I founded this link on Google but it's doesnt work:
http://marketplace.telerik.com/forums/spline-series---only-go-forward

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Feb 2016
1 answer
231 views
`TelerikControls` has a bug and sometimes the `GridView` displays  empty `ComboBoxCells`. In order to fix this I followed their steps here http://docs.telerik.com/devtools/wpf/controls/radgridview/troubleshooting/blank-cells.html and I have to point the `ItemsSource` to a static resource. 

That method works perfectly if the resource never changes, but mine can change depending on a `ComboBoxSelection` within the `DataGrid`. I'm wondering how do I update my `StaticResource` collection in the UI.

I've tried this method http://stackoverflow.com/questions/4438876/wpf-refresh-staticresource but it never changed the collection in the UI. 

**RelationshipEditor.xaml.cs**

private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
    var radcomboBox = e.OriginalSource as RadComboBox;
    if (radcomboBox != null)
    {
        RadComboBox comboBox = (RadComboBox)e.OriginalSource;
        (FindResource("MyChannelDataProvider") as ObjectDataProvider).Refresh();
    }
}`


**RelationshipEditor.xaml**

<ObjectDataProvider x:Key="MyChannelDataProvider" ObjectType="{x:Type Loans:LoanViewModel}">
 </ObjectDataProvider>
 
<Telerik:GridViewComboBoxColumn Header="Relationship"
                                ItemsSource="{Binding SelectedRelationship.GridRelationshipTypes, Source={StaticResource MyChannelDataProvider}}" 
                                DataMemberBinding="{Binding RelationshipType}"
                                SelectedValueMemberPath="Id"
                                DisplayMemberPath="Name">
</Telerik:GridViewComboBoxColumn>


I've set break points for `GridRelationshipTypes` and I can see it is getting the correct collection. If I remove static resource, the code works perfectly but it may still exhibit the telerik bug. 
Stefan
Telerik team
 answered on 12 Feb 2016
5 answers
174 views

Hello,

I'm binding on a GridViewDataColumn a custom type using the DataMemberBinding attribute. Having the "Search as you type" feature enabled, the search is not performed on the column.

Which is the correct method to enable the "Search as you type" filter on a Data Column bound to a custom type?

Is there any mehtod to implement a custom logic?

 

Regards.

Maya
Telerik team
 answered on 12 Feb 2016
7 answers
554 views

Hi,

I take the Dynamic Layer example and i try to replace the points by the polylines.

internal List<PolylineData> GetFeatures(
            double upperLeftLat,
            double upperLeftLong,
            double lowerRightLat,
            double lowerRightLong,
            GeomType storeType)
        {
            try
            {
                PolylineData polyline1 = new PolylineData()
                {
                    ShapeFill = new MapShapeFill()
                    {
                        Stroke = new SolidColorBrush(Colors.Red),
                        StrokeThickness = 2
                    }
                };
 
                LocationCollection pt = new LocationCollection
                {
                    new Location(44.6957539183824, 23.3327663758679),
                    new Location(44.1429369264591, 24.7498095849434),
                    new Location(44.5131732087098, 27.4611884843576),
                    new Location(45.2073941930888, 27.9275176988258)
                };
 
                polyline1.Points = pt;
                _listPolylineDatas.Add(polyline1);
                return _listPolylineDatas;

 

But i have an exception : {"Must create DependencySource on same Thread as the DependencyObject."}

Do you have an solution for this issue ?

 

Thank you

Martin Ivanov
Telerik team
 answered on 11 Feb 2016
1 answer
90 views

Hi,

 

in my XAML I use the following TemplateSelector to have a button beside my "SourceFile" property to open a FileDialog to select a filename:

            <local:PropertyGridTemplateSelector x:Key="dataTemplateSelector">
                <local:PropertyGridTemplateSelector.SourceFilePropertyTemplate>
                    <DataTemplate>
                        <Grid Margin="0,0,2,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBox Text="{Binding SourceFile}" Grid.Column="0"/>
                            <Button Content="..." Width="25" Height="25" Grid.Column="1" Click="SelectFileClick"/>
                        </Grid>
                    </DataTemplate>
                </local:PropertyGridTemplateSelector.SourceFilePropertyTemplate>
                <!-- More templates here -->
            </local:PropertyGridTemplateSelector>

 

    public class PropertyGridTemplateSelector : DataTemplateSelector 
    {
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            PropertyDefinition dpi = item as PropertyDefinition;
            
            if (dpi.DisplayName == "SourceFile")
            {
                return SourceFilePropertyTemplate;
            }

            return null;
        }

        public DataTemplate SourceFilePropertyTemplate { get; set; }
    }

 

when I select a file through my file dialog,I want to update the recontrol to reflect the selection I made in my file dialog...

 

Thank's

Alain

Dilyan Traykov
Telerik team
 answered on 11 Feb 2016
1 answer
174 views

Hi, 

I'm making an application which represents data in a GridView and ScheduleView at the same time.

Now I'm looking for a way to bind GridView's rows heights to a ScheduleView row heights to synchronize both components grid lines while scrolling (I have implemented gridview scrolling with scheduleview scrollbar and that was pretty easy).

Sure, I can hardcode GroupHeader height with group header content template selector, but it won't work for a case when few appointments stretches a group.

So, basically I have to get current row heights from ScheduleView, how can I get them even from code-behind?

Twi pics in the attachment.

 

Many thanks,

Denis.

 

Yana
Telerik team
 answered on 11 Feb 2016
1 answer
1.9K+ views

Hi @ll,

 

first: our basics

  • wpf application with implicit styles
  • user is allowed to change the theme on the fly

Now I want to use different foreground colors of a TextBlock

to illustrate a special meaning. Therefore I use the following style:

<Style TargetType="{x:Type TextBlock}" x:Key="CompareStatusStyle">
    <Style.Triggers>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.Different}">
            <Setter Property="Foreground" Value="Orange"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.OnlyA}">
            <Setter Property="Foreground" Value="Red"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.OnlyB}">
            <Setter Property="Foreground" Value="ForestGreen"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.Unknown}">
            <Setter Property="Foreground" Value="Gray"/>
        </DataTrigger>
    </Style.Triggers>
</Style>

 

This works mostly very well.

But when I used this Style inside a RadTreeView (header) there are some

problems with background colors. (see the attached image)

 

My question: what is the best way to define colors which might be change

using a different theme or adapt automatically to the background.

 

I found a bad way: using code behind to change the background color

of the SelectionVisual of a RadTreeViewItem. But unfortunately not every

theme is build in the same way and the border defining the background

color is not in path from my content to the RadTreeItem, so finding the

current background color is hard.

 

Has anyone an idea how I can solve this?

 

Thanks a lot.

Best regards

Christian

 

Martin Ivanov
Telerik team
 answered on 11 Feb 2016
8 answers
241 views
I am trying to find the right syntax to add a drop shadow via code behind.
Masha
Telerik team
 answered on 11 Feb 2016
2 answers
268 views

I've set my grid to include this property setting: SelectionMode="Multiple" 

From reading the documentation --  You can select a set of grid rows (not necessarily neighboring). Hold the Ctrl key and click on the rows which you want to be selected. -- I would expect this to behave as a standard multi-select scenario just like any Windows control. However, SelectionMode="Multiple" causes my grid to select each row on which I click -- with or without the Ctrl modifier. I need users to be able to select a new row without having to deselect the original row. It seemed like it should be pretty straightforward, but I'm clearly missing something.

Thanks...

 
 
 
Mark
Top achievements
Rank 1
 answered on 11 Feb 2016
2 answers
139 views
I am using below code snippet but not getting end date on xaxis.[Please refer attached screen print.]
 
I need to show end date irrespective of (Odd/Even)number points. Can you please suggest how to achieve this.
 
public DateTimeContinuousAxis SetTimeInterval(DateTimeContinuousAxis xAxis, int dateCount)
      {
          var range = xAxis.Maximum - xAxis.Minimum;
          double lbs = System.Math.Ceiling(range.TotalDays / 10);
 
          if (lbs > 0 && range.TotalDays / lbs > 5)
          {
              xAxis.MajorStepUnit = TimeInterval.Day;
              xAxis.LabelInterval = 3;//(int)Math.Round(lbs);
              xAxis.LastLabelVisibility = Telerik.Charting.AxisLastLabelVisibility.Visible;
              xAxis.MajorStep = range.TotalDays;
          }
 
          return xAxis;
      }
Dinko | Tech Support Engineer
Telerik team
 answered on 11 Feb 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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?