Telerik Forums
UI for WPF Forum
4 answers
144 views
I notice that there is a Windows control in Silverlight. Any liklihood of a similar control in your WPF tools because I need to implement am MDI interface in both silverlight and WPF. Many thanks
Valeri Hristov
Telerik team
 answered on 12 May 2009
3 answers
135 views

Hi,

I have used RadCarouselPanel with Button (Images used in the ex.) control as items as well appllied style to button. The problem is I am not getting scroll effect while clicking on button as demo shows  whereas it shows as Carousel effect on the form.

  <telerik:RadCarouselPanel x:Name="Panel1" VerticalAlignment="Center"
            IsOpacityEnabled="True" IsScalingEnabled="True" IsPathVisible="True"
            PathPadding="50" CanHorizontallyScroll="True" CanVerticallyScroll="True" >
                <Button  Style="{DynamicResource StudyMode}">Menu 1</Button>
                <Button  Style="{DynamicResource StudyMode}">Menu 2</Button>
                <Button  Style="{DynamicResource StudyMode}">Menu 3</Button>
                <Button  Style="{DynamicResource StudyMode}">Menu 4</Button>
                <Button  Style="{DynamicResource StudyMode}">Menu 5</Button>
                <Button  Style="{DynamicResource StudyMode}">Menu 6</Button>
            </telerik:RadCarouselPanel>

I can not understand what is missing. I could not find any method / way to get it work.

Thanks in advance for any help

Punit
Top achievements
Rank 1
 answered on 12 May 2009
1 answer
128 views
Do your chart controls have any export abilities? i.e. PDF, Excel, etc.

I read that charts could be saved as an image. Is it possible to save as a vector graphic?
Vladimir Milev
Telerik team
 answered on 11 May 2009
4 answers
240 views
Hi,


I've got some problems with the GridView style:

1) How can I change the background of a RowIndicator. I tried this but it doesn't works:

 

 

 

 

<Style x:Key="{x:Type telerik:GridViewIndicatorCell}" TargetType="telerik:GridViewIndicatorCell">   
    <Setter Property="Background" Value="{StaticResource GridViewHeaderCellBackgroundBrush}" />   
</Style> 
 
 

 

 

 

 

 

2) How can I change the height of the columns header? This is not working correctly:

 

 

 

 

<Style TargetType="telerik:GridViewHeaderCell">   
    <Setter Property="Height" Value="50" />   
</Style> 
 
 

3) I've tried this:

 

 

 

 

<Style TargetType="{x:Type telerik:GridViewCell}">   
    <Setter Property="OverridesDefaultStyle" Value="False" />   
    <Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />   
    <Style.Triggers>   
        <Trigger Property="Validation.HasError" Value="True">    
            <Setter Property="BorderThickness" Value="1" />    
            <Setter Property="BorderBrush" Value="Red" />   
            <Setter Property="ToolTip" Value="{Binding RelativeSource= {RelativeSource Self},                                                       Path=(Validation.Errors)[0].ErrorContent}" />    
        </Trigger>   
    </Style.Triggers>    
</Style> 
 
 

 

 

 

 

 

 

 

 

but this column doesn't work anymore after that (Cell is empty):

 

 

 

 

<telerik:GridViewColumn>    
<telerik:GridViewColumn.CellStyle>    
<Style TargetType="{x:Type telerik:GridViewCell}">    
    <Setter Property="Template">    
        <Setter.Value>    
            <ControlTemplate TargetType="{x:Type telerik:GridViewCell}">    
                <Border Background="{TemplateBinding Background}"    
                              BorderBrush="{TemplateBinding BorderBrush}"   
                              BorderThickness="{TemplateBinding BorderThickness}">   
                        <Button Style="{StaticResource GridImageButton}"     
                                     Click="Delete_Click">    
                                <Image Source="{StaticResource Delete}" />    
                        </Button>   
                </Border>     
            </ControlTemplate>    
        </Setter.Value>    
    </Setter>    
</Style>    
</telerik:GridViewColumn.CellStyle>    
</telerik:GridViewColumn> 
 

 

 

 

 

 

 

 

 

 

Do you know why?

Thanks,

Xavier.

 

 

 

 

 

 

 

 

 

Steffen
Top achievements
Rank 1
 answered on 11 May 2009
3 answers
212 views
Hi

     I am developing an application in which I require drag drop between two tree. But this is not directly supported in RadTreeView control,so can you suggest me how I can implement it using your RadTreeView control. Please provide me sample code if possible.
I need to implement it in urgent,so please respond it as soon as possible

Thanks in advance
Konstantin Petkov
Telerik team
 answered on 11 May 2009
2 answers
420 views
Can the NumberFormatInfo values (e.g. NumberDecimalDigits) be set in XAML or must they be set in the code behind? The OnLine help only gives examples using code behind.
Greg
Top achievements
Rank 2
 answered on 08 May 2009
1 answer
96 views
Hi,
    I just saw WPF Demo, nice work! By the way, I like the transitions when you click on navigation bar. I am new to WPF, I tried to look into code couldnt figure out how it is done. is there any way you can publish simple code here ? Do Telerik have plan to have transitions in Winforms too?

Thank you
Dwight
Telerik team
 answered on 08 May 2009
9 answers
207 views
Hi!

After upgrading to the latest release, I no longer receive updates after cells/rows have been edited.

I have attached a small example which I believe would work under last version (can't verify this since I have uninstalled it) but not under Q1.

Is there another way to hook up the events, or some other way to detect changes?

Thanks!

<Window x:Class="GraphTest.Window2" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Window2" Height="300" Width="300" Loaded="Window_Loaded">  
    <Grid> 
        <telerik:RadGridView  AutoGenerateColumns="True" telerik:GridViewCell.EditEnded="gridview_EditEnded" telerik:GridViewRow.EditEnded="gridview_RowEditEnded" x:Name="gridview"  Grid.Column="0" Grid.Row="0" > 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
 
using System.Windows;  
using System.Collections.ObjectModel;  
 
namespace GraphTest  
{  
    /// <summary>  
    /// Interaction logic for Window2.xaml  
    /// </summary>  
    ///   
 
    public partial class Window2 : Window  
    {  
        public Window2()  
        {  
            InitializeComponent();  
        }  
 
 
        private void Window_Loaded(object sender, RoutedEventArgs e)  
        {  
            gridview.ItemsSource = new TestList();  
        }  
 
        private void gridview_RowEditEnded(object sender, Telerik.Windows.Controls.GridView.Rows.RecordRoutedEventArgs e)  
        {  
            // Never gets called  
            MessageBox.Show("Row edit");  
        }  
 
        private void gridview_EditEnded(object sender, Telerik.Windows.Controls.GridView.Cells.CellRoutedEventArgs e)  
        {  
            // Never gets called  
            MessageBox.Show("Cell edit");  
        }  
 
    }  
 
    public class TestDataEntry  
    {  
        public int id { getset; }  
        public string value { getset; }  
    }  
 
    public class TestList : ObservableCollection<TestDataEntry>  
    {  
        public TestList()  
        {  
 
            Add(new TestDataEntry() { id = 1, value = "something" });  
            Add(new TestDataEntry() { id = 2, value = "something else" });  
        }  
 
    }  
}  
 


Nedyalko Nikolov
Telerik team
 answered on 07 May 2009
3 answers
91 views
I've got an application that updates the display every 5 mins or so and today I received this exception after it had been running for a couple hours.  I'm not using the tool tip at all so I just thought I'd make you aware of it.  The charts being shown are all 2D (1 pie, 1 bar and 2 line charts) and don't implement any user interactive behaviour.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Charting.BaseChartItem.get_ItemToolTipTimer()
   at Telerik.Windows.Controls.Charting.BaseChartItem.HideToolTip()
   at Telerik.Windows.Controls.Charting.BaseChartItem.BaseChartItemMouseLeave(Object sender, MouseEventArgs e)
   at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.MouseOverProperty.FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, Boolean oldValue)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState)
   at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, DeferredElementTreeState& oldTreeState)
   at System.Windows.Input.MouseDevice.ChangeMouseOver(IInputElement mouseOver, Int32 timestamp)
   at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.OnHitTestInvalidatedAsync(Object sender, EventArgs e)
   at System.Windows.Input.InputManager.HitTestInvalidatedAsyncCallback(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
 



Vladimir Milev
Telerik team
 answered on 07 May 2009
2 answers
144 views
I've got 3 charts in my app. When I don't specify a series.Definition, it works great. When I do, I find that it locks up my app if I call DataSeries.Clear() or if I try to replace a data series. I found a kludgey work-around by calling DataSeries.Reset(), then re-adding the data series, however, I'm seeing a lot of overhead with this method.

When I tried to create my DataSeries on a background thread, then call Dispatcher.BeginInvoke() to update the graph on the UI, I'm getting, "The calling thread cannot access this object because a different thread owns it." If I remove the series.Defintion and have the graph draw as a bar graph instead of a line graph, there are no problems whatsoever.

I'm supposed to be showing this at a trade show tomorrow and I'm stuck. It appears that when I specify a LineSeriesDefinition, a new thread internal to the control is introduced into the equation and it's wreaking havoc. Help!

Below is some of the code.

StartUpdatingCharts() is called from a timer:

protected void StartUpdatingCharts(object dummy)

{

    foreach (object currentGraph in ActiveGraphs)

    {

        Thread t = new Thread(UpdateChartInBackground);

        t.Start(currentGraph);

    }

}


public void UpdateChartInBackground(Object threadContext)

{

    GraphControl currentGraph = threadContext as GraphControl;

    FillChartWithData(currentGraph);

}




FillChartWithData() is called from a background thread:

protected override void FillChartWithData(GraphControl graphControl)

{

    Dictionary<string, double> returnValues = Msi.GetReservoirData(graphControl.Arguments);

    DataSeries series = new DataSeries();

    series.Definition.ShowItemLabels = false;

    LineSeriesDefinition definition = new LineSeriesDefinition();

    definition.ShowItemLabels = false;

    definition.ShowPointMarks = false;

    //series.Definition = definition;  //THIS IS THE LINE THAT CAUSES ALL OF THE PROBLEMS!

 


    foreach (string sectionName in returnValues.Keys)

    {

        series.Add(new DataPoint(returnValues[sectionName]));

    }


    ChartArea
chartArea = graphControl.RadChart.DefaultView.ChartArea;

    chartArea.Dispatcher.BeginInvoke(new UpdateChart(BindDataToChart), chartArea, series);

}

 


private
delegate void UpdateChart(ChartArea chartArea, DataSeries series);


private static void BindDataToChart(ChartArea chartArea, DataSeries series)

{

 

    chartArea.DataSeries.Clear();

    chartArea.DataSeries.Add(series);

}

 

 

Mike
Top achievements
Rank 1
 answered on 06 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?