Telerik Forums
UI for WPF Forum
1 answer
202 views
Hello

I have the following situation:

If the Scale factor is not set as auto, when you click on the canvas resize button, the factor goes to 1, showing the whole image.

You can try this using the demo Image Editor:

1. Open the Image Editor demo
2. Load a large image (1024x768?) 
3. Change the zoom from auto to any other value
4. Click on Canvas Resize 
Observe that the factor now is 1 (100%).

Now if you repeat the same instructions, it won't happen again.

Any ideas?












Missing User
 answered on 10 May 2014
1 answer
209 views
My code is below that

<chartView:CartesianChartGrid MajorLinesVisibility="{Binding Ribbon.AxisGrid, Converter={StaticResource axisConverter}}">
                
  <telerik:CartesianChartGrid.Style>
        <Style TargetType="telerik:CartesianChartGrid">
               <Setter Property="MajorXLineDashArray" 
                      Value="{Binding Ribbon.AxisGridLine, Converter={StaticResource axisConverter}}"/>
               <Setter Property="MajorYLineDashArray" 
                      Value="{Binding Ribbon.AxisGridLine, Converter={StaticResource axisConverter}}"/>
         </Style>
  </telerik:CartesianChartGrid.Style>

................

     <telerik:CategoricalSeriesDescriptor.Style>
            <Style TargetType="chartView:LineSeries">
                    <Setter Property="VerticalAxis" Value="{Binding Data, Converter={StaticResource additionalVerticalAxisConverter}}"/>
            </Style>
     </telerik:CategoricalSeriesDescriptor.Style>


I do setting 'MajorYLineDashArray & MajorLinesVisibility'.

But my program does not appear 'MajorLine'

What should I do?

Additionally, attached file

 

Pavel R. Pavlov
Telerik team
 answered on 10 May 2014
1 answer
61 views
good day,
bought lincença to utlização of some components of Telerik, first I'm going to use and add the RadGridView, but I have some difficulties and doubts.

1. FilteringMode = FilterRow
2. FilterOperator = StartsWith
. 3 Using wildcard expressions to filter every textbox to filter EXAMPLE: Like the SQL Server.

- Now I need to navigate between 'TextBox' filter using the Left and Right keyboard keys.
- Focus to 'Focus' in 'Grid' to "Down" keys, key but I have no idea how to do this.

graciously
André
Dimitrina
Telerik team
 answered on 09 May 2014
1 answer
240 views
I'm building a way to generate columns based on an IEnumerable inside a ViewModel bound to a single row. 
When creating a cell element, the DataContext of that element is set to something based on a property path.

Consider the following example:

class Order {
       public List<OrderLine> Lines { get; }
}
 
class OrderLine {
        public int Index { get; }
      public string Data { get; }
}
  • A GridViewRow would be bound to an Order object.
  • For each line in this example a column will be created.

To achieve this, I created a custom column:

public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
{
       // more code to create item etc.
       item.SetBinding(FrameworkElement.DataContextProperty,
           new Binding(DataMemberBindingPath) { Source = dataItem });
}

The DataMemberBindingPath contains something like Lines[0] or Lines[1]. This works fine since the WPF data binding engine can handle this. When I try to define the SortMemberPath containing an Indexer, nothing happens and the expression does not seem to be parsed.

Looking at the GridViewColumn source code, there is a method of interest:

internal virtual Expression CreateSortKeyExpression(ParameterExpression parameterExpression, ExpressionBuilderOptions options)
    {
        var builder = CreateBuilder(parameterExpression, this.EffectiveSortMemberType, this.EffectiveSortMemberPath, options);
 
        return builder.CreateMemberAccessExpression();
    }

However the method is Internal and I cannot override this to allow working with indexers.

Is there any workaround available to override the sort behavior for a custom column?

Dimitrina
Telerik team
 answered on 09 May 2014
4 answers
218 views
Dear customer support,
I am not sure if this is a bug or it is suppose to work by this way. Here is the code of whole RadRibbonView:
http://pastebin.com/eLKRbZba

And please see this video: https://www.youtube.com/watch?v=m_s0HSMgpK4&feature=youtu.be

First time when I run the project I open the code above in Window and as you see it works.
Then I change it to what I need. The structure is Windows with RadBusyIndicator + Frame where I navigate to Login Page. When user is login the frame navigate to the main program again it is Page. This is the exactly same code in pastebin. As you see when I click ApplicationButton the Backstage not open anymore.

This is a bug or it is suppose to not work in Page?

Best regards,
Saykor
Saykor
Top achievements
Rank 2
 answered on 09 May 2014
1 answer
153 views
Hello.


I have a sql server Table which contains some geometry data ( about 150 points), a column  with the color to applied on these points, and a label.

I need to display these points on my map with the right color and the corresponding label.

I'm new in WPF and telerik objects. If you can explain to me what object I should use (MapPinPoint, MapEllipse. i am lost with your different points objects. And i don't see how I can change the color of a particular point in code behind
Pavel R. Pavlov
Telerik team
 answered on 09 May 2014
3 answers
273 views
I've come across a strange problem when trying to use RelativeSource binding in the DataTemplate used for styling the LabelTemplate of an axis. When RelativeSource binding is used, the labels are drawn over the left side of the chart instead of to the left.

Below is  the code for a simple example exhibiting the problem. (It's obviously a convoluted example since the numbers are all being set to the same value. In my real application I experienced the problem using MultiBinding to pass in some settings as well as the value, but this simpler example shows the same symptoms with single Binding).

If I bind to the Property using ElementName, it displays correctly. However, if I reference the exact same property using RelativeSource, the value is picked up successfully, but the labels are displayed incorrectly. See attached screen shot.

I have a work-around by using the ElementName, but ideally I'd like to use the RelativeSource instead to reference the owning ChartView such that the formatter can be put in a dictionary and used across several charts without having to assign them all the same name.

Thanks,
Louis

The sample app:

<Window x:Class="LabelTemplate_MultiBinding.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:local="clr-namespace:LabelTemplate_MultiBinding"
                Title="MainWindow" Height="768" Width="1024">
    <Grid>
        <telerik:RadCartesianChart x:Name="PropertyChart">
            <telerik:RadCartesianChart.Resources>
                <local:ChartNumberFormatter x:Key="NumberFormatter"/>
                <DataTemplate x:Key="FormattedNumericAxisTemplate">
 
                    <!-- This uses the converter sending the desired value, and it works fine -->
                    <!--<TextBlock Text="{Binding ., Converter={StaticResource NumberFormatter}}" />-->
                     
                    <!-- This uses the converter sending some value via binding using ElementName,
                         and it works fine -->
                    <!--<TextBlock Text="{Binding Path=DataContext.JustANumber,
                                              Converter={StaticResource NumberFormatter},
                                              ElementName=PropertyChart}" />-->
                     
                    <!-- This uses the converter sending the same value as above via binding,
                         but using RelativeSource instead, and it displays incorrectly! -->
                    <TextBlock Text="{Binding Path=DataContext.JustANumber,
                                              Converter={StaticResource NumberFormatter},
                                              RelativeSource={RelativeSource AncestorType={x:Type telerik:RadCartesianChart}}}" />
                </DataTemplate>
            </telerik:RadCartesianChart.Resources>
 
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeCategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
 
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis LabelTemplate="{StaticResource FormattedNumericAxisTemplate}" />
            </telerik:RadCartesianChart.VerticalAxis>
 
            <telerik:RadCartesianChart.Series>
                <telerik:LineSeries
                       CategoryBinding="Date"
                       ValueBinding="Value"
                       ItemsSource="{Binding Path=Series1}">
                </telerik:LineSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
    </Grid>
</Window>

The code-behind:
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Data;
 
namespace LabelTemplate_MultiBinding
{
    public class MyPoint
    {
        public DateTime Date { get; set; }
        public Double Value { get; set; }
    }
    public partial class MainWindow : Window
    {
        public List<MyPoint> Series1 { get; private set; }
        public string DisplaySuffix { get; private set; }
        public double JustANumber { get; private set; }
        public MainWindow()
        {
            Series1 = new List<MyPoint>();
            DisplaySuffix = "M";
            JustANumber = 50000;
            for (int i = 0; i < 5; i++)
            {
                DateTime date = DateTime.Today.AddDays(i);
                Series1.Add(new MyPoint() { Date = date, Value = i * 1000 });
            }
            InitializeComponent();
            DataContext = this;
        }
    }
    public class ChartNumberFormatter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            double number = System.Convert.ToDouble(value);
            return number.ToString("N0");
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}

Petar Marchev
Telerik team
 answered on 09 May 2014
4 answers
222 views
Hi,

In My ViewModel I have: public ObservableCollection<OrderModel> Orders { get; set; }

In OrderModel have: public IEnumerable<utOrderItem> OrderItems { get; set; }

I try to bind this OrderItems to a GridViewComboBoxColumn in RadGridView just to list them:

<telerik:RadGridView Grid.Row="1" Name="grdOrders" ItemsSource="{Binding Orders}" .............

                <telerik:GridViewComboBoxColumn ItemsSource="{Binding Orders[].OrderItems}" Header="Order Items">
                    <telerik:GridViewComboBoxColumn.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding Quantity}" />
                                <TextBlock Grid.Column="1" Text="{Binding ItemType}" />
                                <TextBlock Grid.Column="2" Text="{Binding UnitPrice}" />
                            </Grid>
                        </DataTemplate>
                    </telerik:GridViewComboBoxColumn.ItemTemplate>
                </telerik:GridViewComboBoxColumn>

                <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderItems.Count}" Header="Order Item Count"/>

Column "Order Items" not show anything
Column "Order Item Count" works

Please advise how I can bind collection that exist in every record?

Best regards,
Saykor





Boris
Telerik team
 answered on 08 May 2014
1 answer
94 views
I want to make some letters be bold in the RadGridViewCell. How can I do this ? 
Boris
Telerik team
 answered on 08 May 2014
1 answer
133 views
Hi guy,
I'm using RadGrid to binding data,
How to ScrollViewer to the left of the RadGrid,default ScrollViewer on the right side.
Sory my english.
Boris
Telerik team
 answered on 08 May 2014
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?