Telerik Forums
UI for WPF Forum
1 answer
191 views
Hi, how can I get screenshot of sparkline?

I do the following:

RadSparklineBase sparkline = new RadLinearSparkline();sparkline.XValuePath = "X";sparkline.YValuePath = "Y";sparkline.Margin = new Thickness(0);sparkline.Width = width;sparkline.Height = height;sparkline.ItemsSource = new SparkPoint[]{new SparkPoint(10, 10),new SparkPoint(10, 20),new SparkPoint(20, 10),new SparkPoint(10, 5)};DrawingVisual visual = new DrawingVisual();using (visual.RenderOpen()){new VisualBrush sparkline);}using (MemoryStream stream = new MemoryStream()){Rect rect = new Rect(0, 0, (int)width, (int)height);RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap((int)width, (int)height, 96, 96, PixelFormats.Pbgra32);sparkline.Arrange(rect);renderTargetBitmap.Render(sparkline);PngBitmapEncoder pngBitmapEncoder = new PngBitmapEncoder();pngBitmapEncoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap));pngBitmapEncoder.Save(stream);stream.Flush();image = Image.FromStream(stream);}

Is it possible to make it work? Thanks.
Yavor
Telerik team
 answered on 21 Dec 2010
4 answers
168 views
There seems to be a bug in the RadGridView. If I select the grid and press the delete shortcut key, the selected row is removed from the grid. If I edit a cell before trying to select a row and deleting it; the delete shortcut stops working (pressing it has no effect). The grid is bound to a BindingList. I have noticed the same effect on two different grids, I've also noticed that if I remove an item from the bound collection, the radgridview updates as expected (its just the delete shortcut which is gone). Is this a known issue, and are there any workarounds for it?

I've also created a custom command provider and observed that the delete command is being created and sent to the grid after the del key is pressed.

Update:

I've managed to reproduce this in a small test project.

This is what I bound to:

    internal class ViewModel
    {
        private readonly BindingList<Item> _items = new BindingList<Item>();

        public ViewModel()
        {
            _items.Add(new Item{ A = "First item", B = "howdy"});
            _items.Add(new Item { A = "Second item", B = "doodle" });
        }

        public BindingList<Item> Items
        {
            get { return _items; }
        }
    }
}

This is the view:

<Window x:Class="TelerikWpfBugs.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    
    <Window.Resources>
        
        <Style TargetType="telerik:RadGridView">
            <Setter Property="AutoGenerateColumns" Value="False"></Setter>
            <Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"></Setter>
            <Setter Property="telerik:StyleManager.Theme" Value="Office_Blue"></Setter>
            <Setter Property="ShowGroupPanel" Value="False"></Setter>
            <Setter Property="ShowColumnHeaders" Value="False"></Setter>
            <Setter Property="RowIndicatorVisibility" Value="Collapsed"></Setter>
            <Setter Property="IsFilteringAllowed" Value="false"></Setter>
        </Style>

    </Window.Resources>
    
    <Grid>
        <telerik:RadGridView ItemsSource="{Binding Items}" ShowInsertRow="true">

            <telerik:RadGridView.Columns>

                <telerik:GridViewDataColumn Header="A" DataMemberBinding="{Binding A}"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="B" DataMemberBinding="{Binding B}"></telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

3. Just set the viewmodel as the datacontext for the window upon initialization.

Steps to reproduce (i'm using the wpf q2 2010 sp2 release) :

1. Start test project, notice that you can select rows and delete them
2. Restart test project, double click on a cell to put it into edit mode
3. Go out of edit mode by pressing "escape"
4. Try hitting the del key, the selected row will not be deleted.

I've submitted a support ticket on the issue: 378153
Marius
Top achievements
Rank 1
 answered on 21 Dec 2010
5 answers
229 views
Hi

I have a hierarchy structure like this. Can i use RadTreeList to display the structure. I understand we can SelfReferenceHierarchy feature of RadGridView but is this supported in RadTreeListView

Task 1
    Task 1.1
        Task 1.1.1
Task 2
    Task 2.1

The problem I am facing with RadGridView is that columns are not coming up aligned so i wanted to see if RadTreeListView solves my problem

Regards
Kiran
Pavel Pavlov
Telerik team
 answered on 21 Dec 2010
1 answer
98 views
I have the Q1 2010 Telerik controls.
We implemented the RadSchedulet and I implemented a custom AppointmnetTemplate.
When you move over an appointment an x appears and when you hover over this x it lights up. I want to add an extra button that has the same behavior style wise. but I can not find wich styles are applied to the button and also if I make a copy of the origonal AppointmentTemplate I can not find the button.
Can you give me the Xaml code for the origonal button so I can reuse it?
Konstantina
Telerik team
 answered on 21 Dec 2010
4 answers
119 views
  Hi

I'm trying to design a full screen interface where static panel with no boundary frames can have a dock panel on the right and on the bottom, but I don't know how to eliminate the header tab in the document pane and eliminate the margin frames.

 Is it possible to create such an interface with Dock Control?

 Regards,

Carlos.
Carlos
Top achievements
Rank 1
 answered on 21 Dec 2010
1 answer
60 views
Hi there,

this is a feature request :-)

I would like to have a DataForm control simular to the Silverlight DataForm control which is included within the Silverlight-Toolkit.

While the Silverlight DataForm allows to edit collections, I am more interested using the control for editing a single class/record.
I used the XAML PowerToys (http://karlshifflett.wordpress.com/xaml-power-toys/ scroll down for some screenshots) for a initial layout of a DataForm - would be really helpfull, if I can get something like that for the new WPF DataForm control.

What do you think?

Regards,
Sörnt


Pavel Pavlov
Telerik team
 answered on 21 Dec 2010
4 answers
104 views

Hello

  1. I have cell template with text block and button in grid Data column.

I need when the button clicked to copy the content of the cell to the cell below

Like control + D in excel.

How can I do this?

 We are working MVVM, I add picture of the cell.

 

  1. How I Reach to specific cell in grid and change is value?

Best regards

Ehud

 

 

Avi Avni
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
122 views
Hello,

My problem is when I undock a RadPane and then I lose my transparent background of the PaneGroup and instead get a white(defualt) background of the floating container that I also want to be transparent.
I wanted to know if there is an event that is fired when a RadPane is being undocked (and the other way around). If there is I could find the floating container and set in code its backgorund to transparent.

Thank you
Konstantina
Telerik team
 answered on 20 Dec 2010
1 answer
85 views
Hi everybody,

I am using the RadTileView with the RadFluidContentControl. When I have many items in Restored mode, the TileViewItem shrinks itself hiding the content even if I put a fixed Height and Width and I cannot setup the scroll bars in this mode. Is this an issue? How can I do to enable the scroolbars and setup the minimum size for the TileViewItem in Restored mode?
Thanks in advance!

Christian

BTW: I am using the trial version of WPF RadControls Q3.
Zarko
Telerik team
 answered on 20 Dec 2010
1 answer
90 views

I create my chart by inserting data points like so:

1.Chart.DefaultView.ChartArea.DataSeries.Clear();
2.var series = new DataSeries { Definition = new SplineAreaSeriesDefinition() };
3.foreach (var point in dataPoints) series.Add(point);
4.Chart.DefaultView.ChartArea.DataSeries.Add(series);

The points themselves are created thusly. I explicitly specify types for your convenience.

1.var dataPoints = /*[...]*/.Select( (x, y) => new DataPoint((int)x, (double)y).ToArray()

When I call the add method, I obtain the graph (supplied) "mychartnormal.png". I'm happy with this graph.

When I do the following manipulation of the graph, I obtain a new figure (supplied) "mychartweird.png". The number formatting of the highlighted values shows unnecessary precision. 

1.var series = OverviewChart.DefaultView.ChartArea.DataSeries.FirstOrDefault();
2.if (ColorPicker.SelectedItem != null && series != null)
3.    series.Definition.Appearance.Fill = new SolidColorBrush((Color) ColorPicker.SelectedItem);
4.OverviewChart.DefaultView.ChartArea.DataSeries.Clear();
5.OverviewChart.DefaultView.ChartArea.DataSeries.Add(series);

You may wonder at this point why I am not manipulating the Definition.Appearance.Fill property of the series that I pick out on line one directly. Well, the reason being is that I want to the drawing animation to restart, and I didn't find another way in the API do that. As such I am open to two possible solutions.

Firstly there's the obvious rewrite that solves the problem, but I find it in bad taste to have to recreate the series, since I may need to modify other properties separately, and the copying on line 3 can easily become unwieldy.

1.var series = OverviewChart.DefaultView.ChartArea.DataSeries.FirstOrDefault();
2.if (ColorPicker.SelectedItem == null || series == null) return;
3.var nseries = new DataSeries() {Definition = series.Definition};
4.nseries.AddRange( series.Select(datapoint => new DataPoint(datapoint.XValue, datapoint.YValue)));
5.nseries.Definition.Appearance.Fill = new SolidColorBrush((Color) ColorPicker.SelectedItem);
6.OverviewChart.DefaultView.ChartArea.DataSeries.Clear();
7.OverviewChart.DefaultView.ChartArea.DataSeries.Add(nseries);

Secondly all I really need is to restart the animation. I only found one relevant post, which said to use Chart.ResetTheme(), which didn't work for me.

Evgeni "Zammy" Petrov
Telerik team
 answered on 20 Dec 2010
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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
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
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?