Telerik Forums
UI for WPF Forum
1 answer
115 views
Hi there,

When editing a document with the RadRichTextBox, when i am in header/footer mode (editor.ToggleHeaderFooterEditingMode()) when i mouse double click / or just single mouse click inside the region in pointed to by the red arrow in the screenshot, the mousedoubleclick /mousedown event is not fired.

I have wired up event handlers for my radrichtextbox control:
    editor.MouseDown += editor_MouseDown;
    editor.MouseDoubleClick += editor_MouseDoubleClick;

I am led to believe its not the editor control that handles those events when double clicking in the header/footer area. Is there another object in the editor control responsible for handling these mouse events? When i double click inside a document i get the mousedoubleclick event handler firing fine. If I'm right, what is the object ? if not, what am i doing wrong?

Many thanks,
J
Missing User
 answered on 08 Apr 2014
1 answer
147 views
Hello,

Is it permissible for customers to locate Telerik DLLs on their build server as being local to their solution workspace(s)?

If so, how is this possible? Copying bin DLLs to a solution directory?

Thank you...

Best regards.
Yana
Telerik team
 answered on 08 Apr 2014
1 answer
483 views
Hello Telerik Team,
                                 I am trying to use a single property grid for different objects to show their properties and values on the same grid. I have defined  properties for each object using Property definition. Now on object selection change or object type change I want to hide my properies defined for other objects. It does not work  if I use property from statice resource or property from my ViewModel senario. Somehow its not picking property from my ViewModel datacontext. I have attached my sample application for the scenario. Please suggest something in this respect thanks.

Regards.

UI Code.


<Window x:Class="RadGridView_WPF_AR_19.Window1"
        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:radGridViewWpfAr19="clr-namespace:RadGridView_WPF_AR_19"
        Title="Window1" Height="300" Width="300">


    <Window.Resources>
        <telerik:BooleanToVisibilityConverter x:Key="cnv" />
        <radGridViewWpfAr19:NewMyViewModel x:Key="vm"/>
    </Window.Resources>
    <Grid x:Name="Mygrid" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <ListBox ItemsSource="{Binding Path=Objects}" SelectedItem="{Binding Path=SelectedObject,Mode=TwoWay}" DisplayMemberPath="Name" Height="100" Grid.Row="0"/>
        <telerik:RadPropertyGrid Item="{Binding SelectedObject}" Grid.Row="1" AutoGeneratePropertyDefinitions="False" x:Name="rpg">
            
            <telerik:RadPropertyGrid.PropertyDefinitions>
                <telerik:PropertyDefinition Binding="{Binding Id}" DisplayName="Id" />
                <telerik:PropertyDefinition Binding="{Binding Name}" DisplayName="Name" Visibility="{Binding Source={StaticResource vm}, Converter={StaticResource cnv}, Path=IsA}"/>
                <telerik:PropertyDefinition Binding="{Binding Name}" DisplayName="Name" Visibility="{Binding Source={StaticResource vm}, Converter={StaticResource cnv}, Path=IsB}"/>
                <telerik:PropertyDefinition Binding="{Binding Name}" DisplayName="Name" Visibility="{Binding Source={StaticResource vm}, Converter={StaticResource cnv}, Path=IsC}"/>
            
            </telerik:RadPropertyGrid.PropertyDefinitions>
            
        </telerik:RadPropertyGrid>
    </Grid>
</Window>


ViewModel and DataContext code.


namespace RadGridView_WPF_AR_19
{
    using Telerik.Windows.Controls;

    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            this.DataContext = new NewMyViewModel();
        }
    }

    public class NewMyViewModel:ViewModelBase
    {
        private object selectedObject;

        private List<object> objects ;
        public List<object> Objects {
            get
            {
                return this.objects;
            }
        }

        public NewMyViewModel()
        {
            this.objects = new List<object>
                          {
                              new A{Name="A",Id=1},
                              new B{Name="B",Id=2},
                              new C{Name="C",Id=3}
                          };


        }


        public object SelectedObject {get
        {
            return this.selectedObject;
        }
            set
            {
                this.selectedObject = value;
                
                OnPropertyChanged(()=>this.SelectedObject);

                OnPropertyChanged(() => this.IsA);
                OnPropertyChanged(() => this.IsB);
                OnPropertyChanged(() => this.IsC);
            }
        }

        public bool IsA {
            get
            {
                return this.SelectedObject != null && this.SelectedObject.GetType().Name == "A";
            }
        }
        public bool IsB
        {
            get
            {
                return this.SelectedObject != null && this.SelectedObject.GetType().Name == "B";
            }
        }
        public bool IsC
        {
            get
            {
                return this.SelectedObject != null && this.SelectedObject.GetType().Name == "C";
            }
        }
    }

    public class A
    {
        public string Name { get; set; }
        public int Id {get;set;}

        public override string ToString()
        {
            return "A Class";
        }
    }
    public class B
    {
        public string Name { get; set; }
        public int Id { get; set; }

        public override string ToString()
        {
            return "B Class";
        }
    }
    public class C
    {
        public string Name { get; set; }
        public int Id { get; set; }

        public override string ToString()
        {
            return "C Class";
        }
    }
}
 
 
Yoan
Telerik team
 answered on 08 Apr 2014
1 answer
95 views
Basically the problem is I'm trying to add series to the graph but I've tried everything possible in the StepAreaSeries they just won't show

        private void FillChart()
        {
            IList<ChartDisplayData> productionList = new List<ChartDisplayData>();
            IList<ChartDisplayData> downTimeList = new List<ChartDisplayData>();
            //resize chart width based on number of points
            UpDownTimeChart.Width = ContentGrid.ActualWidth - 100;
            _Items.Where(c => c.DTID == null).ToList().ForEach(pi => 
            {
                productionList.Add(new ChartDisplayData { XValue = pi.Start, YValue = pi.CounterBTL.Value });
                if(!IsDetailMode.Value)
                    productionList.Add(new ChartDisplayData { XValue = pi.End, YValue = 0 });
            });
            ProductionSeries.ItemsSource = productionList;
            int MaxBtlCounter = MaxChartValue;
            UpDownTimeChart.Series.Add(ProductionSeries);
            //Remove previous DT charts
            UpDownTimeChart.Series.RemoveAll(c => c.Name != "ProductionSeries");
            IEnumerable<IGrouping<Guid?, Item>> DTTypeIDs = _Items.Where(c => c.DTID != null).GroupBy(c => c.DTCauseTypeID);
            foreach (IGrouping<Guid?, Item> DTTypeID in DTTypeIDs)
            {
                Item DTItem = _Items.Where(c => c.DTCauseTypeID == DTTypeID.Key).FirstOrDefault();
                StepAreaSeries serie = new StepAreaSeries();
                serie.CombineMode = Telerik.Charting.ChartSeriesCombineMode.None;
                serie.CategoryBinding = new PropertyNameDataPointBinding{ PropertyName = "XValue"};
                serie.ValueBinding = new GenericDataPointBinding<ChartDisplayData, int> { ValueSelector = Data => Data.YValue };
                Style serieStyle = new Style();
                serieStyle.TargetType = typeof(Path);
                Setter serieColorSetter = new Setter();
                serieColorSetter.Property = StepAreaSeries.FillProperty;
                serieColorSetter.Value = new SolidColorBrush(StringExtensions.HexStringToColor(DTItem.DTCauseTypeColor));
                serieStyle.Setters.Add(serieColorSetter);
                serie.AreaShapeStyle = serieStyle;

                foreach (var item in DTTypeID)
                {
                    var cdcStart = new ChartDisplayData();
                    cdcStart.XValue = item.Start;
                    cdcStart.YValue = item.CounterBTL.Value;
                    var cdcEnd = new ChartDisplayData();
                    cdcEnd.XValue = item.End;
                    cdcEnd.YValue = 0;

                    downTimeList.Add(cdcStart);
                    downTimeList.Add(cdcEnd);
                }
                serie.ItemsSource = downTimeList;
                UpDownTimeChart.Series.Add(serie);
            }
        }
WPF
          

               
1.<telerik:RadCartesianChart x:Name="UpDownTimeChart"><br>                <telerik:RadCartesianChart.HorizontalAxis><br>                    <telerik:DateTimeContinuousAxis LabelFormat="HH:mm" PlotMode="OnTicks" MajorStepUnit="Hour"<br>                                                    MaximumTicks="25" MajorTickOffset="1" MajorStep="1"/><br>                </telerik:RadCartesianChart.HorizontalAxis><br>                <telerik:RadCartesianChart.VerticalAxis><br>                    <telerik:LinearAxis Maximum="{Binding MaxChartValue}"/><br>                </telerik:RadCartesianChart.VerticalAxis><br>                <telerik:StepAreaSeries x:Name="ProductionSeries" CategoryBinding="XValue" ValueBinding="YValue"><br>                    <telerik:StepAreaSeries.AreaShapeStyle><br>                        <Style TargetType="Path"><br>                            <Setter Property="Fill" Value="Green"/><br>                        </Style><br>                    </telerik:StepAreaSeries.AreaShapeStyle><br>                </telerik:StepAreaSeries><br>            </telerik:RadCartesianChart>


Can someboy help me out on this issue? Thanks !
Petar Marchev
Telerik team
 answered on 08 Apr 2014
1 answer
85 views
I have a grid with about 1,000 records and then grouped - the largest group has about 580 records in it. When I click on the group heading to expand this group it is very slow (over 1 to 2 seconds). The grid has 16 columns in it. When I make the window smaller (i.e. only a smaller portion of the grid is visible) this reduces the time to expand the group.

Can you suggest any likely causes for this behavior and/or any ways to optimize it

Thanks
Yoan
Telerik team
 answered on 08 Apr 2014
1 answer
141 views
I am trying to upgrade UI for wpf from 2012 version to the latest 2014 Q1. I got the build error complaining about MetroColors missing. I check the class is in old version's Telerik.Windows.Controls namespace but NOT in the new version's same assembly. Where should I get the assembly containing MetroColors class and related ones?
Yana
Telerik team
 answered on 08 Apr 2014
1 answer
148 views
 I am using the following CellTemplate because I need the IsEditable property for the combo box:


<telerik:GridViewDataColumn Width="100" >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox DisplayMemberPath="Name"  SelectedValuePath="ID" SelectedValue="{Binding CountryID, Mode=TwoWay}" ItemsSource="{Binding Countries, Source={StaticResource CountriesList}}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewDataColumn>

My issue is that now my OnRowEditEndedCommandCommandExecuted event does not run, and I do not know how to get it to run when the normal combo box is edited to update the correct row. Any ideas? Thank you.
None
Top achievements
Rank 1
 answered on 07 Apr 2014
1 answer
101 views
Hey guys,

I noticed in the versions notes for internal build 2014_1_0324 there is a line in the 'What's new' section that says 'Introduced Auto themeable color value'.

Can you go into a little more detail about what this is, and how to use it?

Thanks,
Niko 
Alex
Telerik team
 answered on 07 Apr 2014
1 answer
182 views
I'm using ProLinq (http://prolinq.codeplex.com/) to expose IQueryable directly to clients of my service.

I'm binding this Queryable to my RadfGridView but it's not working how i expected: The IQueryable that the service return is only for one use, when grid need to refresh (by a filter change for example) the grid must be obtain other IQueryable from the service.

I'm trying to make this to work in several ways but i don't success for now :(
- I'm overload Filtering and Sorting events to change grid filter every time
- I'm try to convert the FilterDescriptor to System.Linq.Expression to get new IQueryable from service and apply the expression on it, but i don't know
- I'm trying use VirtualQueryableCollectionView but when i filter the grid the service is not called.

Any idea how i can complete this behavior?

Thanks.
Oscar
Top achievements
Rank 1
 answered on 07 Apr 2014
1 answer
125 views
Hello, I'm trying to validate pasting into the grid. I'm using PastingCellClipboardContent because it lets me know which cell is being pasted into and the value, but I can't cancel at this point. Even if I set the e.Handled = true, the value is in the cell. The Pasting event will cancel, but that event doesn't have a GridViewCellInfo object like PastingCellClipboardContent does, so I don't know which cell(s) are being pasted and their values. Is there a way to handle this so I can validate the input and cancel or allow each value for each cell?

Thanks,
Scott
Dimitrina
Telerik team
 answered on 07 Apr 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?