Telerik Forums
UI for WPF Forum
2 answers
147 views

am facing a problem in richtext box 

 

i want to load data through  "D:\file.ext" but it shows me error 

string cannot convert to stream or byte

Tanya
Telerik team
 answered on 21 Mar 2016
3 answers
154 views

I have created a RadCartesianChart that shows live data coming in from a machine in a factory that charts the weight of each unit.

Using this xaml:

<telerik:RadCartesianChart.HorizontalAxis>
    <telerik:CategoricalAxis />
</telerik:RadCartesianChart.HorizontalAxis>

With this code-behind:

RadObservableCollection<double> dbl = new RadObservableCollection<double>();
this.chart.Series[0].ItemsSource = dbl;

Then as data comes in, I add doubles to the dbl variable. This all works well but my horizontal axis starts with no datapoints, therefore no demarcation ticks, and the spread of the first datapoints is ridiculously wide, until it reaches a hundred and then I start removing the zeroeth point and adding the next one at the end. Then it maintains a stable appearance.

I have written a hack by adding 100 datapoints with "0" value like this:

dbl = new RadObservableCollection<double>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

But I wonder if there isn't a "proper" way to get the desired result.

Bob Graham

 

 

 

 

 

 

 

Martin Ivanov
Telerik team
 answered on 21 Mar 2016
6 answers
1.0K+ views
I bind ItemsSource property to collection of elements that have 'IsChecked' property. How to bind 'RadTreeViewItem.IsChecked' property to 'MyElement.IsChecked'?

It is needed because I set IsVirtualizing="True" and thus I have to store whether item is checked in separate place.
Martin Ivanov
Telerik team
 answered on 21 Mar 2016
3 answers
124 views

Hello,

It could be possible to represent X axis and Y axis into bottom side and right hand, respectively?

<telerik:RadHeatMap x:Name="radHeatMap" ShowToolTips="True" CellBorderThickness="1" CellBorderColor="#FFE4E4E4">
    <telerik:RadHeatMap.Definition>
        <telerik:CategoricalDefinition ItemsSource="{Binding Path=HeatMapSeries}" RowGroupMemberPath="Z" ColumnGroupMemberPath="X" ValuePath="Y" Colorizer="{StaticResource HeatMapValueGradientColorizer}" />
    </telerik:RadHeatMap.Definition>
</telerik:RadHeatMap>

 

Regards,

Gerard.

Gerard
Top achievements
Rank 1
 answered on 21 Mar 2016
1 answer
84 views

Hi there,

your release notes

UI for WPF 2016.1.314 Version Notes

and

Previous Version 2016.1.302

are identical.

 

Reference:

http://www.telerik.com/account/VersionNotes.aspx?nb=1&id=5352

 

Greets,

Thorsten

 

Peshito
Telerik team
 answered on 21 Mar 2016
1 answer
220 views

Hello.

I need to place an application window (for example, notepad.exe) embedded within a RadPane.

I've managed to do in a Window application but do not get into a RadPane.

XAML user control located in the RadPane:

 
<UserControl x:Class="EmbeddedApp"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:I3TV.GAMA.WPF.UI.Media.Player.Player"
             d:DesignHeight="300"
             d:DesignWidth="300"
             mc:Ignorable="d">
    <StackPanel x:Name="AppContainer" />
</UserControl>

[DllImport("user32.dll", SetLastError = true)]
private static extern long SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
 
[DllImport("user32.dll", EntryPoint = "SetWindowLongA", SetLastError = true)]
public static extern int SetWindowLongA([System.Runtime.InteropServices.InAttribute()] System.IntPtr hWnd, int nIndex, int dwNewLong);
 
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hwnd, int x, int y, int cx, int cy, bool repaint);
 
private const int GWL_STYLE = (-16);
 
private const int WS_VISIBLE = 0x10000000;
 
public EmbeddedApp()
{
    InitializeComponent();
    this.Loaded += new RoutedEventHandler(OnVisibleChanged);
}
 
/// <summary>
/// Create control when visibility changes
/// </summary>
/// <param name="e">Not used</param>
protected void OnVisibleChanged(object s, RoutedEventArgs e)
{
    // If control needs to be initialized/created
    if (_iscreated == false)
    {
        // Mark that control is created
        _iscreated = true;
 
        // Initialize handle value to invalid
        _appWin = IntPtr.Zero;
 
        try
        {
            var procInfo = new System.Diagnostics.ProcessStartInfo(this.exeName);
            procInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(this.exeName);
            // Start the process
            _childp = System.Diagnostics.Process.Start(procInfo);
 
            // Wait for process to be created and enter idle condition
            _childp.WaitForInputIdle();
 
            // Get the main handle
            _appWin = _childp.MainWindowHandle;
        }
        catch (Exception ex)
        {
            Debug.Print(ex.Message + "Error");
        }
 
        // Put it into this form
        var helper = new WindowInteropHelper(Window.GetWindow(this.AppContainer));
        SetParent(_appWin, helper.Handle);
 
        // Remove border and whatnot
        SetWindowLongA(_appWin, GWL_STYLE, WS_VISIBLE);
 
        // Move the window to overlay it on this window
        MoveWindow(_appWin, 0, 0, (int)this.ActualWidth, (int)this.ActualHeight, true);
 
    }
}

 

Thank you!

Yana
Telerik team
 answered on 21 Mar 2016
2 answers
110 views

Hi,

I'd like to know if it is possible to customize some aspects of the BulletGraph control:

1. When I set the value of Minimum property to a value higher than zero, an oval is shown instead of the bar for the FeaturedMeasure, is it possible to show the bar even when the Minimum property value is higher than zero?

2. Is it possible to hide the axis of values?

3. Is it possible to change the width of the FeaturedMeasure bar? I am using a  RadVerticalBulletGraph.

 

Thanks,

Alberto Martinez

Amige
Top achievements
Rank 1
Veteran
 answered on 18 Mar 2016
1 answer
110 views

Hi,

Not sure where to put this issue so general discussion perhaps the best place.

I'm using a MVVM model, with the telerik controls WPF TreeView, WPF GridView, WPF DataForm. 
As a data backend I'm using Entity Framework code first. This mock-up project works really great.

I'm having an issue with filtering the data of the QueryableEntityCollectionView which I use as a source of the WPF GridView and WPF DataForm.
Filtering is defined as FilterDescriptor filterDeleted = new FilterDescriptor("IsDeleted", FilterOperator.IsEqualTo, false); works just fine.

Now I want to filter on a property of a subobject; Person class has a property Club. Club is also a class.
As the FilterDescriptor is not able to filter on FilterDescriptor("Club.Id", FilterOperator.IsEqualTo, 10);
I've added an Additional propertie in the Model

[NotMapped]
[DisplayName("ClubId")]
public int ClubId         
{             
    get             
           {                 
               
return Club == null ? -1 : Club.Id;
           
}
}

Defining a FilterDescriptor FilterDescriptor("ClubId", FilterOperator.IsEqualTo, 10) is not working, result is no records at all.
Testing with for example PersonID instead of ClubId works fine.
I've also have a similar ClubId property for calculating Age of person. Filtering on age doesn't work as well. Seems that members not original referencing to table column are not working?

 

Eric

Eric
Top achievements
Rank 1
 answered on 18 Mar 2016
6 answers
211 views
Hi,

Is it possible to achieve the Self Reference Hierarchy (RadGridView) feature in TreeListView without using list. I mean I have a datatable with the columns like ID, Name, Parent ID, Location, etc.

I have directly binded the DataTable property to the RadGridView like that I have to do with TreeListView to avoid parent child column width, scrolling for child gird, etc.

Please help me to achieve this with TreeListView.

Thanks,
Ramasamy
Stefan Nenchev
Telerik team
 answered on 18 Mar 2016
3 answers
428 views

I'am trying to implement a data validation for the columns in my RadGridView. I would like to validate the data that is loaded into the grid, not the data that is entered by the user into the grid. To to this I've written a ValidationRule which returns a ValidationResult and implemented this rule in the binding of the column:

 

<telerik:GridViewDataColumn Header="Test" >
    <telerik:GridViewDataColumn.DataMemberBinding>
        <Binding Path="MyObject.MyProperty" Converter="{StaticResource TestConverter}" NotifyOnValidationError="True">
            <Binding.ValidationRules>
                <validators:TestValidator ValidatesOnTargetUpdated="True" />
            </Binding.ValidationRules>
        </Binding>
    </telerik:GridViewDataColumn.DataMemberBinding>
</telerik:GridViewDataColumn>

These are the settings I've set on my RadGridView:

<telerik:RadGridView telerik:StyleManager.Theme="Expression_Dark" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="False" ShowColumnHeaders="True" SelectionMode="Extended" EnableColumnVirtualization="False" RowIndicatorVisibility="Collapsed" RowDetailsVisibilityMode="Collapsed" EditTriggers="None" ClipboardCopyMode="None" ClipboardPasteMode="None">

The ValidationRule is called when loading data into the Grid and a negative ValidationResult is returned, but the error is not displayed in the Grid. What am I doing wrong?

Stefan Nenchev
Telerik team
 answered on 18 Mar 2016
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?