Telerik Forums
UI for WPF Forum
1 answer
246 views
I have a series of square XY Scatter Charts which all range from +Value to -Value with 0 in the centre in both axis. (I have attached a picture of one of these charts to better illustrate what I mean). 

I need to be able to zoom in on all of these charts at once using a slider bar placed elsewhere on the form. I can easily tie the zoom level of the chart to the slider bar by using: 

chart.Zoom = new Size(zoomSlider.Value, zoomSlider.Value);

which zooms into both axis at the same rate. However by default this seems to zoom in to left most point on the X axis and the top most point on the Y. The behaviour I need is to zoom into the centre of each chart so that point 0, 0 is always at the centre (The two charts in the picture illustrate this. The Zoom/Pan bars are only there to illustrate what I mean and will not be there in the final product).

I'm fairly certain that I need to use PanOffset to achieve this but I am unsure how to calculate the point to pass to it. 

Any help would be appreciated. 

Thanks, 

Andy.



Rosko
Telerik team
 answered on 22 Jul 2013
3 answers
98 views
Hello,

I'm creating a custom ScatterLineSeries to simulate annotations in his own series. For this, I am register the load event of the series and look for the first canvas (serie.FindChildByType<Canvas>()) to add elements.
How do I calculate the coordinates corresponding to a DataPoint on canvas?

Thanks
Petar Marchev
Telerik team
 answered on 22 Jul 2013
1 answer
56 views
WWWWWWe
Yana
Telerik team
 answered on 22 Jul 2013
2 answers
300 views
hi,

i try to setup the cotrols that moving the of the toolbars within the toolbartray is possible (drag & drop ) but nothing work´s.
so how could i setup the control correctly that my users are able to configure there layout as they like ?

thanks regards


my xaml.

----------------------
<UserControl x:Class="xxxx.yyyy.Views.ContextTool"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:regions="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism"
			 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
			 xmlns:vm="clr-namespace:xxxx.yyyy.ViewModels"
			 mc:Ignorable="d" 
			 d:DesignHeight="100" d:DesignWidth="1280">
	<Grid x:Name="ContextToolRoot" HorizontalAlignment="Stretch">
		<telerik:RadToolBarTray IsManipulationEnabled="True">
			<telerik:RadToolBar Band="0" BandIndex="0" IsOverflowOpen="True" IsManipulationEnabled="True">
				<TextBlock Margin="0,0,9,0" Text="Open:" />
				<Button>
					<Image Source="Images/16/open.png" />
				</Button>
				<telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem>
			</telerik:RadToolBar>
			<telerik:RadToolBar Band="0" BandIndex="1">
				<telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem>
				<telerik:RadMenuItem Header="Item 2"></telerik:RadMenuItem>
				<telerik:RadMenuItem Header="Item 3"></telerik:RadMenuItem>
			</telerik:RadToolBar>
			<telerik:RadToolBar Band="1" BandIndex="0">
				<telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem>
				<telerik:RadMenuItem Header="Item 2"></telerik:RadMenuItem>
				<telerik:RadMenuItem Header="Item 3"></telerik:RadMenuItem>
			</telerik:RadToolBar>
		</telerik:RadToolBarTray>
	</Grid>
</UserControl>
Petar Mladenov
Telerik team
 answered on 22 Jul 2013
1 answer
104 views
Hi ,
Since my project have to show the RSTP real-video, I change it to WPF application from silverlight. But very strange, the Map not work which is fine for silverlight, so I test the Hotel example of WPF, it also can not show the map. Could you provide me a single worked Hotel example solution for reference?

Thanks
Liu
Liu
Top achievements
Rank 1
 answered on 20 Jul 2013
2 answers
460 views
Hi,

I am starting with Telerik MVVM for WPF.

I would like to know how can I transform a Window Event (closing Event) in a DelegateCommand so that I can Drive in my ViewModel the event.

Thanks in advance
mvbaffa
Top achievements
Rank 1
 answered on 19 Jul 2013
5 answers
333 views

I'm replacing a plain textbox control that I had, with a RadMaskedNumericInput control, in a VS 2012 app. This control is to handle a client's social security number. However, in testing it I've found it doesn't exactly do what I want it to do. Here's the XAML:

<telerik:RadMaskedNumericInput x:Name="txtSSN" MinWidth="80"
        Text="{Binding SocialSecurityNo, UpdateSourceTrigger=PropertyChanged}" Mask="###-##-####"
        VerticalContentAlignment="Center" FontSize="15" Margin="3,0" BorderBrush="#FFE3E9EF"
        InputBehavior="Insert" />

With this, when the window first comes up, it looks like this: "___-__-___0". So if the user starts typing in a SSN, the problem becomes apparent. The 0, at the end of the control, starts getting pushed along. For example, suppose the user wanted to enter "123-45-6789" as a SSN. When they start typing what they get is, "___-__-__01". By the time they get to entering all digits from 1 to 9, in order, what they wind up with in the control is this: "012-34-5679". That is not what they want, but I don't know to make it work properly. Most likely I defined some property wrong, or left a property out. So, how do we achieve what we're trying to achieve?

Rod
Top achievements
Rank 1
 answered on 19 Jul 2013
2 answers
61 views
Hi
I have a Radgrid and I have drag and drop enabled for this grid.
Whenever I try to drag a nonselected row and drop then all the other rows which are in between the dragged point and dropped point are getting selected. But I want just that one particular row  to be dragged.Did any one see this issue. I attached a image how it is being done.
Any help is much appreciated. These are the events I see.

Telerik.windows.controls.gridview.selection.selectiondrag.tryselectrowundermouse(bool scrolladjusted)
Telerik.windows.controls.gridview.selection.selectiondrag.tryselectelementundermouse(bool scrolladjusted)

I am handling these events
 DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
            DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
            DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop);
            DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted);
            DragDropManager.AddDragOverHandler(this.AssociatedObject, OnDragOver);

In the attached image I tried to drag no 3 and drop it at no 7. But all the other rows in between are selected while dragging.

Any help is much appreciated.

Thanks
Rakesh


 



Rakesh
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
121 views
Hi,

A property that was changed in code does not display in the cell it is bound to until the cell is clicked on twice.  The first click outlines the cell and the second click puts the cell into edit mode.  When in edit mode the new value is displayed.  Also, if a row is added the cell value is also displayed. What do I need to do to get the cell to display when the property is set.


private string columnAlias;
public string ColumnAlias 
{
get { return this.columnAlias; }
        set
        {
        if (columnAlias == value)
                return;
   
                this.columnAlias = value;
                Filter.EditWhereFilter();
                OnPropertyChanged("ColumnAlias");
}
}


 <telerik:GridViewDataColumn
            Width="15*" Name="ColumnAlias" Header="Alias" DataMemberBinding="{Binding ColumnAlias, Mode=TwoWay}">
</telerik:GridViewDataColumn>


<telerik:RadGridView
Name="radGridViewSelectedColumns" Grid.Row="1"
ItemsSource="{Binding CriteriaColumns,
Source={StaticResource criteriaColumns}}"  
        telerik:RadDragAndDropManager.AllowDrop="True" 
        SelectionMode="Extended" 
        SelectionChanged="radGridViewSelectedColumns_SelectionChanged"
        ShowGroupPanel="False"
        IsFilteringAllowed="False"
        ShowColumnHeaders="true"
        BorderThickness="0"
        EnableColumnVirtualization="False"
        EnableRowVirtualization="False"
        AutoGenerateColumns="False"
        CanUserFreezeColumns="False"
        CanUserResizeColumns="True"
        CanUserDeleteRows="True"
        Deleted="radGridViewSelectedColumns_Deleted" 
        RowIndicatorVisibility="Visible">
Dimitrina
Telerik team
 answered on 19 Jul 2013
1 answer
166 views
Hello
I have strange "error" when using column grouping in xaml. The grouping is working, and I cannot find any issue with that however I don't like having binding errors in output window because that means that something is wrong.

I have flowing column:
<telerik:GridViewDataColumn Header="Device Type" Width="Auto" DataMemberBinding="{Binding Path=DeviceTypeDescription}" UniqueName="DeviceTypeDescription" />
 and following group description:
<telerik:RadGridView.GroupDescriptors>
<telerik:ColumnGroupDescriptor Column="{Binding Columns[\DeviceTypeDescription\], ElementName=GridView}" SortDirection="Ascending" />
</telerik:RadGridView.GroupDescriptors>
However during application start I can see following error:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Columns[DeviceTypeDescription]; DataItem=null; target element is 'ColumnGroupDescriptor' (HashCode=36687163); target property is 'Column' (type 'GridViewColumn')

When I go to the tab where grid is, grouping is working properly. Just for information. Data for taht grid is loaded only when I open tab not during application start.

Regards

Vera
Telerik team
 answered on 19 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?