Telerik Forums
UI for WPF Forum
3 answers
102 views
Hi,

I create a custom data template for my appointments and I always have a vertical white bar at the left of each cell (picture enclosed). I would like to know if it's possible to remove it.

Thank's
Alain
Kalin
Telerik team
 answered on 09 Apr 2014
1 answer
63 views
Hi,

I have a UserControl which contain a RadScheduleView with a WeekViewDefinition. In my control, I would like to have a DependencyProperty to set the number of minutes (int) for the MinorTickLength. I would like to know how I can acheive this.

Thank's
Alain
Kalin
Telerik team
 answered on 09 Apr 2014
3 answers
97 views
Hi Telerik,

I want to adjust all my axis values on a radcartesianchart.

See the attached image "before changing y-axis values.JPG" and "after adjusting the y-axis value.JPG".

These images shows a change in the y-axis which is done by draggin the horizontal line up or down.

Is it possible to do something like this using telerik?

Best regards,
Jeppe
Unisense
Top achievements
Rank 1
 answered on 09 Apr 2014
1 answer
326 views
How to get a selected item of a child treeview programmatically 
Martin Ivanov
Telerik team
 answered on 09 Apr 2014
1 answer
170 views
Hi,

I have this scenario: I want to create from code behind some RadDiagrams, then export every diagram to a single PNG image without open and display the raddiagram.

Below there is my two solutions of code which don't  work. IN particular, the stream is always empty.
1)

        var myGraphSource = new GraphSource(); //this contains a list of shapes and connections
       var diagram = new RadDiagram();
       diagram.GraphSource = myGraphSource ;
        diagram.SelectAll();
         using (var stream = new MemoryStream()) {
                       diagram.ExportToImage(stream, margin: new Thickness(0,0,0,0), backgroundBrush: new SolidColorBrush(Colors.White));
                        image = stream.ToArray();
        }      
2) 


                    var diagramViewModel = new DiagramViewModel(myGraphSource);
                    var diagramView = new DiagramView();
                    diagramView.DataContext = diagramViewModel;
    using (var stream = new MemoryStream()) {
                       diagramView.diagram.ExportToImage(stream, margin: new Thickness(0,0,0,0), backgroundBrush: new SolidColorBrush(Colors.White));
                        image = stream.ToArray();
                    }

In both cases the code doesn't work and in the last scenario, I' ve bounded the GraphSource in the xaml. Is there a way to get my issue????
Thanks

Ciro


     
Martin Ivanov
Telerik team
 answered on 08 Apr 2014
3 answers
80 views

Hi,

I've submitted the following already as a pre-sales question, but I really need support fast so I'm also submitting it to the users.  Please let me know if anyone knows how to fix this bug, or if it's truly something with the Telerik GridView control.

Here's a link (http://1drv.ms/1hm6fJs) to my compressed solution on my OneDrive which I've shared.  The following steps will cause the test program to crash.

1. Run the application.
2. Scroll to the right so the WorldSeriesWins column is visible.
3. Click the filter icon button and set the filter to be "> 27" in the pop-up window
4. Click the "Filter" button and all rows will disappear (as expected) and the grid will scroll the whole way back to the left.
The Filter pop-up windows will still be visible and at this point click the "Clear Filter" button which causes the application to crash.

The bug seems to occur if the column is not visible.  If you were to scroll the scroll bar back to the right so the WorldSeriesWins col was visible and click the "Clear Filter" button it would not crash.

Thanks!

Yordanka
Telerik team
 answered on 08 Apr 2014
1 answer
97 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
130 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
455 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
86 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?