Telerik Forums
UI for WPF Forum
1 answer
89 views
Am new to this telerik controls and C#; am using the RadTreeListView - in one column am adding the UserControl which will some set of control also i need to take the values from the user control to main radtreelist view observableCollection

Could you please help how we need to do it.
Dimitrina
Telerik team
 answered on 05 Jun 2014
1 answer
163 views
hi,

I use radchart in my project, since i use NoXaml dll, my DataSeries no longer displayed.  I try to define the SerieStyle on the chart area and on the SplineAreaSeriesDefinition and PieSeries but it doesn't works.

In the OutPutWindow: i got a warning when i click on the legend : System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.Charting.ChartLegend', AncestorLevel='1''. BindingExpression:Path=LegendItemMarkerShape; DataItem=null; target element is 'ChartLegendItem' (Name=''); target property is 'MarkerShape' (type 'MarkerShape')

This is the xaml code :

<telerik:RadChart telerik:StyleManager.Theme="Windows8" x:Name="radAreaChart" UseDefaultLayout="False" BorderThickness="0" Background="{x:Null}" BorderBrush="{x:Null}" >
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="auto"></RowDefinition>
                                    <RowDefinition Height="*"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="auto"/>
 
                                </Grid.ColumnDefinitions>
                                <telerik:ChartTitle telerik:StyleManager.Theme="Windows8" x:Name="AreaChartTitle" HorizontalAlignment="Center" Content="{Binding Resource.ConnectionPerProfile}"
                                        Grid.Row="0" Grid.Column="1" Background="{x:Null}" FontFamily="Segoe UI Semibold" BorderThickness="0" OuterBorderBrush="{x:Null}" FontSize="13.333">
                                </telerik:ChartTitle>
                                <telerik:ChartArea telerik:StyleManager.Theme="Windows8"  Grid.Row="1" x:Name="AreaChart"    Margin="0"  LegendName="AreaChartLegend">
 
                                </telerik:ChartArea>
 
                                <telerik:ChartLegend telerik:StyleManager.Theme="Windows8" Grid.Row="1" x:Name="AreaChartLegend" Header="{Binding Resource.Legend}" Margin="-4,0" Grid.Column="1" />
                            </Grid>
                        </telerik:RadChart>



And this is my C# Code to add Series
AreaChart.DataSeries.Clear();
           AreaChart.AxisX.AutoRange = true;
           AreaChart.AxisY.AxisStyles.AlternateStripLineStyle = this.Resources["HorizontalStripLineStyle"] as Style;
           AreaChart.SeriesStyles.SplineAreaSeriesStyle = this.Resources["ScatterAreaSeriesStyle"] as Style;
           DataSeries chartProfilesSeries = new DataSeries();
                     
           chartProfilesSeries.Definition = new SplineAreaSeriesDefinition();
 
           chartProfilesSeries.Definition.SeriesStyle = this.Resources["ScatterAreaSeriesStyle"] as Style;
 
           if (null != (this.DataContext as MainViewModel).LstChartTotalDateConnexion)
           {
               foreach (ChartsDateConnectionDTO c in (this.DataContext as MainViewModel).LstChartTotalDateConnexion)
               {
                   chartProfilesSeries.Add(new DataPoint()
                   {
                       //Label = String.Format("{0} : {1} ", Strings.TotalOfconnection, c.Date.ToString("dd/MM")),
                       YValue = c.Connection,
                       XCategory = c.Date.ToString("dd/MM"),
                       Tooltip = String.Format("{0} du {1} ", Strings.TotalOfconnection, c.Date.ToString("dd/MM"))
                   });
               }
               chartProfilesSeries.Definition.SeriesName = String.Format("{0}", Strings.TotalOfconnection);
               chartProfilesSeries.LegendLabel = String.Format("{0}", Strings.TotalOfconnection);
               chartProfilesSeries.Definition.ShowItemToolTips = true;
               chartProfilesSeries.Definition.ShowItemLabels = true;
               chartProfilesSeries.Definition.InteractivitySettings.HoverScope = InteractivityScope.Series;
               chartProfilesSeries.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Series;
 
 
               AreaChart.DataSeries.Add(chartProfilesSeries);

Thanks for you help

Best regards

Petar Marchev
Telerik team
 answered on 05 Jun 2014
5 answers
119 views

I have a Radlistbox binded trough ItemsSource and Windows8TouchTheme applied.

Inside each item in RadListBox there is a button with a click event.

If the item is not selected the event is fired, but if the item is selected the event is NOT fired.

If I remove the Windows8TouchTheme the event is always fired.

A think this is a bug, any workaround for this?

Alek
Telerik team
 answered on 05 Jun 2014
2 answers
136 views
I am using a TreeListView and have multiple roots on my tree but they share a common child.
A -> B
D -> B
B -> C

I would expect to see two roots A and D which expand out to
A
  B
    C
D
  B
    C
The TreeListView roughly displays this but expanding and collapsing is behaving strangely.
If I expand B it sometimes expands both Bs and sometimes C becomes its own row that will not collapse into B.
Can someone help explain this behavior to me?






















































Dimitrina
Telerik team
 answered on 05 Jun 2014
6 answers
107 views
Hi Telerik,

I'm testing the telerik components in order to see if we could use them in our products. I was very happy to see the nice themes you guys provide. Although, I can't make StyleManager work.

There is no problem when creating a WPF application, but the following project produces errors all the time (unable to locate the source for Themes.cs):

I create a class library with some XAMLs. This class library is registered to be com accessible in order to make 3d party softwares (managed and unmanaged) able to use our dll. This fails however when I use a stylemanager anywhere on the XAML.

I've provided 2 solutions as an example. testTelerikStyleManager creates the com accessible dll (and also a debug forms application => In which the stylemanager doesn't provide an error) and testTelerikStyleManager2 which has a forms application that will create an instance of our com-accessible dll. That's where stylemanager crashes.

download: http://www.dstudiofs.eu/uitwissel/testTelerikStyleManager.rar

If you would like to test on your machines, the workflow is:
1 build testTelerikStyleManager in debug mode to register Class1 for com interop
2 open testTelerikStyleManager2 and start debugging.... The error should be shown in a MessageBox when clicking the button

Kind regards
Masha
Telerik team
 answered on 05 Jun 2014
3 answers
165 views
I am using one grid inside radcombobox just like the xaml bellow.

      

  
<telerik:RadComboBox DisplayMemberPath="Descricao" Name="radComboBoxResultado" Grid.Column="2" StaysOpenOnEdit="True" Height="26">             <telerik:RadComboBox.Items>                 <telerik:RadComboBoxItem>                     <telerik:RadComboBoxItem.Template>                         <ControlTemplate>                             <Grid>                                 <Grid.RowDefinitions>                                     <RowDefinition Height="*"></RowDefinition>                                     <RowDefinition Height="*"></RowDefinition>                                 </Grid.RowDefinitions>                                 <telerik:RadGridView  x:Name="RadGridView" AutoGenerateColumns="False" ShowGroupPanel="False" CanUserFreezeColumns="False"                                               RowIndicatorVisibility="Collapsed" IsReadOnly="True" MinWidth="300" MaxWidth="600"                                              IsFilteringAllowed="False" ItemsSource="{Binding PagedSource, ElementName=RadDataPager}" SelectionChanged="RadGridView_SelectionChanged"                                              Height="150" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" Loaded="RadGridViewResultadoBusca_Loaded">                                     <telerik:RadGridView.Columns>                                         <telerik:GridViewDataColumn Header="Referência" Width="120" DataMemberBinding="{Binding CodigoProduto}" IsReadOnly="True"></telerik:GridViewDataColumn>                                         <telerik:GridViewDataColumn Header="Produto" Width="*" DataMemberBinding="{Binding Descricao}" IsReadOnly="True"></telerik:GridViewDataColumn>                                         <telerik:GridViewDataColumn Header="Venda" Width="*" DataMemberBinding="{Binding ValorVenda}" DataFormatString="C2"  IsReadOnly="True"></telerik:GridViewDataColumn>                                     </telerik:RadGridView.Columns>                                 </telerik:RadGridView>                                 <telerik:RadDataPager Name="RadDataPager" Grid.Row="1" DisplayMode="FirstLastNumeric,Last" PageSize="20" Loaded="RadDataPager_Loaded"></telerik:RadDataPager>                             </Grid>                         </ControlTemplate>                     </telerik:RadComboBoxItem.Template>                 </telerik:RadComboBoxItem>             </telerik:RadComboBox.Items>         </telerik:RadComboBox>



Everything is ok but when i select the row in grid i'd like the text to appear in Text property of RadcomboBox  .

I've tried to binding the selected items together, and does not works, as well as, implement the selectedChnaged of the grid to set the combo.Text property with no success.


How can i achieve this?

Thanks
Yana
Telerik team
 answered on 05 Jun 2014
4 answers
343 views
Hello!

I need to process PreviewDrop  event from telerik's DragDropManager, and I am using Prism 5.0 in my WPF application.
I tried to search documentation and forums, but I was not able to find examples of how can I subscribe my command from ViewModel with the DragDropManager event PreviewDrop to be able to check if operation can be done, or I need to cancel the drop.

Can anyone help me with this?
Dmitry
Top achievements
Rank 1
 answered on 04 Jun 2014
1 answer
131 views
I want to add my custom attribute in SaveLayout.xml (RadDocking.SaveLayout).

See attach file.

and How to read that attribute for radpane header visible hidde by RadDocking.LoadLayout

I want to your recommand.




George
Telerik team
 answered on 04 Jun 2014
1 answer
90 views
http://www.telerik.com/forums/broken-intellisense-after-adding-tileview-and-radialgauge-to-the-project
Same problem as posted above.  
.Net 4.5, VS 2012.
Problem appeared after adding a TileList.  Removing the TileList didnt fix it.  
Neither did rebooting, clearing bin directory and obj directory.  
Boris
Telerik team
 answered on 04 Jun 2014
1 answer
255 views
Hello,

I've encountered a problem that looks like so strange and I don't know how to deal with it. I tried a lot of combinations but nothing worked.

I've the "main" class 'MainWindow.cs' which has :

Datas datas = new Datas();
ConfigTabCameras ctc = new ConfigTabCameras(datas);
this.DataContext = datas;

MainWindow.xaml : 1st row doesn't work, 2nd works
<custom:TabCameras />
<telerik:RadGridView ItemsSource="{Binding DatasTabCameras}"/>

Datas.cs :
private ObservableCollection<ViewTabCameras> datasTabCameras;
 
public ObservableCollection<ViewTabCameras> DatasTabCameras
{
    get
    {
        if (this.datasTabCameras == null)
        {
            this.datasTabCameras = new ObservableCollection<ViewTabCameras>();
        }
 
        return this.datasTabCameras;
    }
    set
    {
        this.EventPropertyChanged("DatasTabCameras");
    }  
}
 
public Datas()
{
 
}

And the inheritance of INotifyPropertyChanged etc...

ConfigTabCameras :
public class ConfigTabCameras : AbstractSql
    {
        public ConfigTabCameras(Datas datas)
        {
            this.configurationDatas = datas;
            ConfigurationTabCameras();
        }
 
        private void TabCamerasConfiguration()
        {
            connect.dbConnect();
 
            command.CommandText = "SELECT f1, f2, f3 " +
                  "FROM t1ORDER BY f1";
            command.CommandType = CommandType.Text;
            command.Connection = connect.getSqlConnection();
 
            dataReader = command.ExecuteReader();
 
            while (dataReader.Read())
            {
                ViewTabCameras vtc = new ViewTabCameras();
 
                vtc.Field1 = dataReader["f1"].ToString();
                vtc.Field2 = int.Parse(dataReader["f2"].ToString());
                vtc.Field3 = int.Parse(dataReader["f3"].ToString());
                 
                donneesConfiguration.DatasTabCameras.Add(vtc);
            }
             
            command.Dispose();
            dataAdapter.Dispose();
 
            connect.dbDisconnect();
        }
    }

ViewTabCameras.cs :
private string field1;
private int field2;
private int field3;
 
public string Field1
{
    get
    {
        return this.field1;
    }
    set
    {
        this.field1= value;
        this.EventPropertyChanged("Field1");
    }
}
 
// Same for Field2 and 3...


And finally my custom UserControl as a GridView TabCameras.cs :
private Donnees donnees;
 
public TabCameras()
{
    datas = new Datas();
    //this.DataContext = datas;
    InitializeComponent();
}

TabCameras.xaml :
<telerik:RadGridView ItemsSource="{Binding DatasTabCameras}">
        <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Field1}"
                                            Header="Field 1"
                                            UniqueName="Field1" />
                <telerik:GridViewComboBoxColumn Header="Field 2"
                                                ItemsSource="{Binding Field2}"
                                                UniqueName="Field2"
                                                DataMemberBinding="{Binding Field2}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Field3}"
                                                Header="Field 3"
                                                UniqueName="Field3" />
        </telerik:RadGridView.Columns>
</telerik:RadGridView>


So the MainWindow is supposed to include my custom controls but they don't display anything. However, when I add a GridView control in my MainWindow with the same binding, it works perfectly. I tried to change the position of "dataContext" in many classes but nothing changed.

So, how can I have my custom controls in my MainWindow which display everything returned by my SQL query and saved in my Datas.cs please ?

I hope I was clear enough, I don't think I used the easier way...

Thanks !
Christophe
Top achievements
Rank 1
 answered on 04 Jun 2014
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
DataPager
PersistenceFramework
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?