Telerik Forums
UI for WPF Forum
1 answer
213 views
Hello

I would like to know how I could fill all empty space in a RadRibbonTab with a RadRibbonGroup.
Martin Ivanov
Telerik team
 answered on 02 Sep 2014
2 answers
134 views
hello, i am trying to replace my radchart with a radchartview,
but i stumble on this problem  : the lines connecting my values are not drawn ( using line series)
( i am using a DateTimeCategoricalAxis because i only want ticks for dates with actual records in my itemsource,
and don't need the distance between 2 values to be an indication of the time between, the production environment wil have multiple values on some day, and none on others, but i dont think is the cause of my problem   )
( screenshot to show the resulting window)
viewmodel :
public class ViewModel
{
public ViewModel()
{
List<TestItem> items = new List<TestItem>();
for (int i = 1 ; i< 20; i++){
var r = new TestItem();

r.Datum = DateTime.Now.AddDays(-1 * i * i /** 10 / 3*/);
if (( i % 2) == 0){
r.Waarde1 = DateTime.Now.Second / i;
}
if ((i % 3) == 0)
r.Waarde2 = DateTime.Now.Millisecond / i;
if ((i % 5) == 0)
r.Waarde3 = DateTime.Now.Second;
items.Add(r);
}
Items = items;
 }
public List<TestItem> Items { get; set; }
}

public class TestItem {

public DateTime Datum { get; set; }
public decimal? Waarde1 { get; set; }
public decimal? Waarde2 { get; set; }
public decimal? Waarde3 { get; set; }

public override string ToString()
{
return string.Format(" {0:d} : {1} - {2} - {3} ", Datum,Waarde1,Waarde2, Waarde3);
}
}

<Window x:Class="testChart.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Test="clr-namespace:testChart"
Title="MainWindow" Height="568" Width="828" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Window.Resources>
<Test:ViewModel x:Key="Vm"/>
<SolidColorBrush x:Key="TempColor" Color="Brown" />
<SolidColorBrush x:Key="GewichtColor" Color="#FF25A0DA" />
<SolidColorBrush x:Key="PijnColor" Color="#FFFF6900" />
</Window.Resources>
<Grid DataContext="{StaticResource Vm}" Height="517" Width="783">
<telerik:RadCartesianChart HorizontalAlignment="Left" Margin="0,12,0,0" Name="radCartesianChart1" VerticalAlignment="Top" Height="465" Width="654">
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartPanAndZoomBehavior />
</telerik:RadCartesianChart.Behaviors>
 <telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorLinesVisibility="XY" MajorXLineDashArray="5, 5" MajorYLineDashArray="5, 5">
 </telerik:CartesianChartGrid>
</telerik:RadCartesianChart.Grid>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeCategoricalAxis LineThickness="1" MajorTickInterval="1" MajorTickLength="5" TickThickness="1" LabelFormat="ddMMyyyy" LabelFitMode="Rotate" />
</telerik:RadCartesianChart.HorizontalAxis>
 <telerik:LineSeries ItemsSource="{Binding Path=Items}" CategoryBinding="Datum" ValueBinding="Waarde1" CombineMode="Stack" StrokeThickness="1" ShowLabels="True" Stroke="Red">
<telerik:LineSeries.StrokeShapeStyle>
<Style TargetType="Path">
<Setter Property="Stroke" Value="Red"/>
<Setter Property="StrokeDashArray" Value="10 5"/>
<Setter Property="StrokeThickness" Value="3"/>
</Style>
</telerik:LineSeries.StrokeShapeStyle>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Red" Background="Red" BorderThickness="1">
  </telerik:LinearAxis>
</telerik:LineSeries.VerticalAxis>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="AliceBlue" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
<telerik:LineSeries ItemsSource="{Binding Path=Items}" StrokeThickness="10" ShowLabels="False" Stroke="Blue" CombineMode="Stack" BorderThickness="1">
<telerik:LineSeries.CategoryBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Datum" />
</telerik:LineSeries.CategoryBinding>
<telerik:LineSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Waarde2" />
</telerik:LineSeries.ValueBinding>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="Blue" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Green" Background="#FF001900" BorderThickness="1" />
</telerik:LineSeries.VerticalAxis>
</telerik:LineSeries>
<telerik:LineSeries ItemsSource="{Binding Path=Items}" StrokeThickness="10" ShowLabels="True" Stroke="#FF000019">
<telerik:LineSeries.CategoryBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Datum" />
</telerik:LineSeries.CategoryBinding>
<telerik:LineSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Waarde3" />
</telerik:LineSeries.ValueBinding>
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis LineStroke="Red" Background="#FF001900" BorderThickness="1" />
</telerik:LineSeries.VerticalAxis>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="Red" Height="10" Width="10"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
</telerik:RadCartesianChart>
 </Grid>
</Window>
stijn Ver Eecke
Top achievements
Rank 1
 answered on 02 Sep 2014
1 answer
116 views
Can some please help me, I cannot seem execute a delete operation when one item is inside my observable collection and binds to the RadDataForm, however when I bind 2 or more items I can  then perform delete up until one item remains then “CurrentItem” is null. why is that ???

The offending snippet takes place here.  

private void UserDetailsRadDataForm_OnDeletedItem(object sender, ItemDeletedEventArgs e)
    {
        try
        {
            SessionManager.Bind();
            var user =  UserDetailsRadDataForm.CurrentItem as UserModel;
            _userDetailsViewModel.DeleteUser(user);
        }
        finally
        {
            SessionManager.Unbind();
        }
    }
Boris
Telerik team
 answered on 02 Sep 2014
4 answers
314 views
I am attempting to use a GridView to display the contents of a delimited file.  Initially the application reads the 1st 20 lines of the file and displays these in a single column with one row per line.  The user then selects the field delimiter to use to parse the rows into columns.

My problem is when the 1st 20 rows are displayed only the first character from each row is displayed in the single column of the GridView;

private void PreviewFile(string importFile)
{
    string line = null;
    string[] colData = {"Column 1"};
 
    ObservableCollection<string> colRows = new ObservableCollection<string>();
 
    FileImport.CSV csvImport = new FileImport.CSV(fileName);
 
    for (int iIndex = 0; iIndex < 20; iIndex++)
    {
        line = csvImport.GetLine();
        if (line == null) break;
        colRows.Add(line);
    }
 
    this.gvText.ItemsSource = colRows;
    this.AddColumns(gvText, colData);
    //this.gvText.ShowColumnHeaders = true;
}
 
private void AddColumns(RadGridView gv, string[] columnNames)
{
    gv.Columns.Clear();
 
    for (int i = 0; i < columnNames.Length; i++)
    {
        gv.Columns.Add(new GridViewDataColumn
        {
            Header = columnNames[i],
            DataMemberBinding = new Binding(String.Format("[{0}]", i)),
            Width = new GridViewLength(1, GridViewLengthUnitType.Star)
            //MaxWidth = maxWidth
        });
    }
}

I have confirmed that "csvImport.GetLine" is returning a single line from the text file (anything from ~400 to ~1500 characters) and that these are added correctly to the ObservableCollection.

How can I get the GridView to display the entire string for each row?

Thanks in advance for any help anyone can provide.
Raymond
Top achievements
Rank 1
 answered on 02 Sep 2014
1 answer
115 views
Hello.
I have an application view that allows user to switch between several pages.
In one view there are a ListBox and a ComboBox which used for a grouping selection.
Items for a ListBox are being added using Timer every several seconds no matter which view is selected by user.
So, when user selects view with grouping ComboBox, chooses grouping value and then switches back to another view and then again switches to the view with grouping the program raises NullReferenceException (if you try to select anyting in ListBox or try to change grouping value).
I gave a link to the sample project that demonstrates the problem.
https://www.dropbox.com/s/3flf3woe5ba76d1/WpfApplication1.zip?dl=0

Is there any workaround?

P.S. If I use standard Visual Studio ListBox no exception is thrown. It gives an error only when RadListBox is used.

Thank you for the help.
Polya
Telerik team
 answered on 01 Sep 2014
3 answers
284 views
Hello,
I've been working last days on a demo with RadDiagrams...and I've almost reached my goal... I just need a few help on containers....

I've created via code some different containers based on a level I had

foreach (var level in levels)
          {
              CheckListItemContainer container = new CheckListItemContainer();
 
              container.Content = "TEST";
              foreach (var item in level)
              {
                  if (!container.InternalItems.Any(x => x.ItemID == item.ItemID))
                  {
                      var checklistItem = new CheckListItem();
 
                      checklistItem.ItemID = item.ItemID;
                      checklistItem.Codice = item.Codice;
                      checklistItem.Descrizione = item.Descrizione;
                      checklistItem.Note = item.Note;
                      checklistItem.Status = item.Status;
                      checklistItem.Tipologia = item.Tipologia;
                      checklistItem.TipologiaID = item.TipologiaID;
 
                      container.AddItem(checklistItem);
                  }
 
                  Tmp[item.ItemID] = level.Key;
              }
 
              this.CheckListDiagramGraphSource.AddNode(container);
          }

I've set in my view the TreeLayout as TreeLeft as (http://www.telerik.com/help/silverlight/media/raddiagram-features-layout-tree-left.png)

and I have a container for each level.... I wish to have all the container aligned horizontaly but actualy it displays as the image I've attached

How do I tell the container to set the items vertically?
Ho do I align the containers horizontaly?

Thanks in advance

Pavel R. Pavlov
Telerik team
 answered on 01 Sep 2014
1 answer
60 views
Hi,
 
I require a control that would accept input in the form : 2 w 3 d 5 h 6 m. User should be able to input the values before d, w, h and m ( which represents weeks, days, hours, minutes). Is it possible to use MaskedInput to achieve the same. w,d,h and m should not be editable. How can I implement that?

Thanks,
Divya
Petar Mladenov
Telerik team
 answered on 01 Sep 2014
3 answers
189 views
I run new WPF UI DEMO Application About RadGridView Custom Filter ;first click Custom Filter and click datetimepicker control  in custom Filter  don't click any "filter" or "clear" button
now click other place in application; Custom Filter did not auto close ;but if i was did not click any datetimepicker or combobox in custom filter , custom filter can be auto close when lose focus;I test TeleRik Silverlight UI DEMO that was fine !

Dimitrina
Telerik team
 answered on 01 Sep 2014
1 answer
127 views
Hello, is there a possibility to bind a list of columndefinition in viewmodel on GanttGrid without direct access to the gantcontrol (gantt.Columns.add)?
Best Regards Robert ...
public void InitGanttColumns()
        {
            //Title ----
            ColumnDefinition GanttColumn = new TreeColumnDefinition();
            GanttColumn.Header = "Title";
            GanttColumn.Width = 200;
            GanttColumn.MemberBinding = new Binding("Title");
            GanttColumns.Add(GanttColumn);
     
            // Start ----
            GanttColumn = new ColumnDefinition();
            GanttColumn.Header = "Start";
            GanttColumn.Width = 100;
 
            var itemsBinding = new Binding("Start")
            {
                Converter = new GanttModuleTypeConverter(),
                ConverterParameter = "date"
            };
 
            GanttColumn.MemberBinding = itemsBinding;
            GanttColumns.Add(GanttColumn);
             
            // End ----
            GanttColumn = new ColumnDefinition();
            GanttColumn.Header = "End";
            GanttColumn.Width = 100;
 
            itemsBinding = new Binding("End")
            {
                Converter = new GanttModuleTypeConverter(),
                ConverterParameter = "date"
            };
 
            GanttColumn.MemberBinding = itemsBinding;
            GanttColumns.Add(GanttColumn);
        }
Yana
Telerik team
 answered on 01 Sep 2014
17 answers
419 views
I'm not sure how to make this happen, but the treeview starts going up and down like crazy.


(Scroll to the right, the treeview is docked on the right side of the window)

Have you ever seen this before? How can we solve it?

Thanks!
Petar Mladenov
Telerik team
 answered on 01 Sep 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
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
ProgressBar
Sparkline
LayoutControl
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
Rating
Accessibility
Callout
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?