Telerik Forums
UI for Universal Windows Platform Forum
5 answers
75 views

Hi,

How can I disable animation of a calendar cell when the mouse goes over it?

 

Thanks

Krzysztof 

 

lucky
Top achievements
Rank 1
 answered on 02 Apr 2020
1 answer
154 views

Is there a way to create multiple charts in XAML using the DataTemplate tag and a collection of collections (e.g., ObservableCollection<Dictionary<string,int>>)  as the ItemsSource?  I have no need of displaying multiple series on one chart via SeriesProvider, since the keys/categorical variables in each Dictionary are not related.  Below was my attempt to implement it in XAML:

01.<ItemsControl Name="MyCategoryCharts">
02.    <ItemsControl.ItemTemplate>
03.        <DataTemplate x:DataType="dghelper:CategoryGroupCollection">
04.            <controls:Expander ExpandDirection="Down"
05.                                Header="{Binding CategoryName}"
06.                                FontWeight="SemiBold">
07. 
08.                <GridView>
09.                    <GridView.ItemTemplate>
10.                        <DataTemplate x:DataType="Dictionary">
11.                            <telerikChart:RadCartesianChart>
12. 
13.                                <telerikChart:RadCartesianChart.HorizontalAxis>
14.                                    <telerikChart:LinearAxis />
15.                                </telerikChart:RadCartesianChart.HorizontalAxis>
16.                                <telerikChart:RadCartesianChart.VerticalAxis>
17.                                    <telerikChart:CategoricalAxis />
18.                                </telerikChart:RadCartesianChart.VerticalAxis>
19. 
20.                                <telerikChart:RadCartesianChart.Grid>
21.                                    <telerikChart:CartesianChartGrid MajorLinesVisibility="X" StripLinesVisibility="X"/>
22.                                </telerikChart:RadCartesianChart.Grid>
23. 
24.                                <telerikChart:BarSeries ItemsSource="{Binding GroupDict}">
25.                                    <telerikChart:BarSeries.CategoryBinding>
26.                                        <telerikChart:PropertyNameDataPointBinding PropertyName="Key"/>
27.                                    </telerikChart:BarSeries.CategoryBinding>
28.                                    <telerikChart:BarSeries.ValueBinding>
29.                                        <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
30.                                    </telerikChart:BarSeries.ValueBinding>
31.                                </telerikChart:BarSeries>
32. 
33. 
34.                            </telerikChart:RadCartesianChart>
35.                        </DataTemplate>
36.                    </GridView.ItemTemplate>
37.                </GridView>
38.            </controls:Expander>                                       
39.        </DataTemplate>
40.    </ItemsControl.ItemTemplate>
41.</ItemsControl>

 

If there's no XAML solution for this problem, could you provide a C#/Code-behind way of creating a RadCartesianChart, i.e., a C#-equivalent of this tutorial (Getting Started with Telerik UI for UWP).  I've implemented this as a workaround/alternative solution to the yet-to-be-shown XAML solution but have encountered a roadblock in assigning the CategoryBinding and ValueBinding.  Below is my current progress to programmatic solution:

 

01.private RadCartesianChart CreateChart(CategoryGroupCollection coll)
02.{           
03.    // Set up chart
04.    RadCartesianChart retChart = new RadCartesianChart();
05.    retChart.PaletteName = PredefinedPaletteName.DefaultDark;
06.    retChart.DataContext = coll;
07.    retChart.HorizontalAxis = new LinearAxis();
08.    retChart.VerticalAxis = new CategoricalAxis();
09.             
10.    // Set up the data series for the chart
11.    BarSeries series = new BarSeries();
12.    series.ItemsSource = coll.GroupDict;           
13. 
14.    // TODO: assigning CategoryBinding and ValueBinding (PropertyNameDataPointBinding)
15. 
16.    // Add the series to the chart
17.    retChart.Series.Add(series);
18.    return retChart;
19.}
20. 
21.private void CreateCharts(IEnumerable<CategoryGroupCollection> dataCollection)
22.{
23.    foreach (CategoryGroupCollection item in dataCollection)
24.    {
25.        ChartsStackPanel.Children.Add(CreateChart(item));
26.    }
27.}
28. 
29.public class CategoryGroupCollection
30.{
31.    public string CategoryName { get; set; }
32.    public Dictionary<string, int> GroupDict { get; set; }
33.}
Lance | Manager Technical Support
Telerik team
 answered on 26 Mar 2020
3 answers
683 views
Hey Gang,
I'm attempting to bind a graph to an observable collection, and I'm getting 
"Collection was modified; enumeration operation may not execute."

Ok - I'm 99% sure what is going on - the collection (which is of immutable objects BTW) gets items added by a time in a remote DLL - every 1/2 second or so

I'm guess that is the issue.  Even if I could pause the remote operation, what is the preferred way to get the bound collection onto the graph's thread, as we never know when the collection will update

My current code - the basic  chart is in the XAML (and named dataGraph)  (oh, this is all UWP)

If I comment out the line for the ItemsSource, I'm all good

   LineSeries lineSeries = new LineSeries();
  lineSeries.Stroke = new SolidColorBrush(Colors.Orange);
  lineSeries.StrokeThickness = 2;
  lineSeries.VerticalAxis = new LinearAxis();

  lineSeries.ItemsSource = theData; //this is the  ObservableCollection<DataItem>
  lineSeries.CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "TimeUTC" };
  lineSeries.ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Value" };

  dataGraph.HorizontalAxis = new DateTimeContinuousAxis() { LabelFormat = "HH:mm:ss" };
  dataGraph.Series.Add(lineSeries);
Lance | Manager Technical Support
Telerik team
 answered on 06 Mar 2020
2 answers
190 views

Hi,

I have developed a UWP app which is working fine on my computer (x86 Architecture). The application should be run on a Raspberry PI3. I have moved from the the standard datagrid to using the RadDataGrid.

When I now want to build my app against the ARM architecture I get an error message: 'DataGridxxxx is not a member of xxxxControl'.

Is Telerik UI for UWP compatible with ARM? If not I need to revert to using the standard datagrid.

Bart
Top achievements
Rank 1
 answered on 17 Feb 2020
6 answers
443 views

Hi everyone,

In the UWP app I'm working on one page I have downloads multiple files (mostly PDF's) concurrently for users attending board meetings and lists them in a DataGrid with some columns  being defined in DataTemplates. The business requirements for this grid specify that while each item is downloading the DataGrid row should be disabled but from reading the docs and googling I cannot see any way to do this.

I am very new to the Telerik DataGrid though so still hoping this can be done, even if it involves some sort of hack - does anyone know how I could achieve this?

I have listed just the DataGrid XAML below but can add the DataTemplate code if needed.

<Grid:RadDataGrid x:Name="agendaDataGrid"
                              Grid.Row="4"
                              Margin="48,0,48,24"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch"
                              ItemsSource="{x:Bind ViewModel.AgendaItems, Mode=OneWay}"
                              UserGroupMode="Disabled"
                              UserFilterMode="Disabled"
                              UserColumnReorderMode="None"
                              UserSortMode="None"
                              AutoGenerateColumns="False"
                              GridLinesVisibility="Horizontal"
                              BorderBrush="Transparent"
                              BorderThickness="0"
                              SelectedItem="{x:Bind ViewModel.SelectedAgendaItem, Mode=TwoWay}"                             
                              LayoutUpdated="OnLayoutUpdated">

                <Grid:RadDataGrid.Columns>

                    <!-- Read state of item -->
                    <Grid:DataGridTemplateColumn SizeMode="Auto"                                                  
                                                 CellContentTemplate="{StaticResource ReadStateDataTemplate}">
                        <Grid:DataGridTemplateColumn.Header>
                            <Border CornerRadius="45"
                                    Background="{ThemeResource SystemControlDisabledChromeDisabledLowBrush}"
                                    Height="10"
                                    Width="10"
                                    />
                        </Grid:DataGridTemplateColumn.Header>
                    </Grid:DataGridTemplateColumn>

                    <!-- Item position -->
                    <Grid:DataGridNumericalColumn Header="#"
                                                  PropertyName="DisplayPosition"
                                                  SizeMode="Auto"  />

                    <!-- Download status -->
                    <Grid:DataGridTemplateColumn SizeMode="Auto" CellContentTemplateSelector="{StaticResource DownloadAgendaItemTemplateSelector}">
                        <Grid:DataGridTemplateColumn.Header>
                            <TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                       Text="&#xE896;" />
                        </Grid:DataGridTemplateColumn.Header>
                    </Grid:DataGridTemplateColumn>

                    <!-- Download status -->
                    <Grid:DataGridTemplateColumn SizeMode="Auto"
                                                 CellContentTemplateSelector="{StaticResource MediaAgendaItemDataTemplateSelector}">
                        <Grid:DataGridTemplateColumn.Header>
                            <TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                       Text="&#xEE56;" />
                        </Grid:DataGridTemplateColumn.Header>
                    </Grid:DataGridTemplateColumn>

                    <!-- Item name -->
                    <Grid:DataGridTextColumn x:Name="ItemNameColumn"
                                             Header="Item name"
                                             PropertyName="Name"
                                             SizeMode="Stretch"                                             
                                             />

                    <!-- Item type/style -->
                    <Grid:DataGridTextColumn Header="Type"
                                             PropertyName="Style"
                                             SizeMode="Auto" />

                    <!-- Estimated time of each item (or video length) -->
                    <Grid:DataGridTextColumn Header="Timing"
                                             PropertyName="Timing"
                                             SizeMode="Auto" />

                    <!-- Number of pages (PDF only)-->
                    <Grid:DataGridTextColumn Header="Pages"
                                             PropertyName="Pages"
                                             SizeMode="Auto" />

                    <!-- Colour of item in documents navigation bar in PdfAgendaItem -->
                    <Grid:DataGridTemplateColumn SizeMode="Fixed"
                                                 Width="5"
                                                 CellContentTemplate="{StaticResource ItemColourDataTemplate}" />
                </Grid:RadDataGrid.Columns>
            
                <FlyoutBase.AttachedFlyout>
                    <Flyout Placement="Full"
                            FlyoutPresenterStyle="{StaticResource VoteFlyoutPresenterStyle}">
                        <Grid Width="430">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TextBlock TextWrapping="Wrap"
                                       Text="{x:Bind ViewModel.SelectedVoteItem.VoteTitle, Mode=OneWay}" />
                            <TextBlock TextWrapping="Wrap"
                                       Text="{x:Bind ViewModel.SelectedVoteItem.VoteDescription, Mode=OneWay}"
                                       Grid.Row="1" />
                            <ListView Grid.Row="3"
                                      ItemsSource="{x:Bind ViewModel.SelectedVoteItem.VoteOptions, Mode=OneWay}"
                                      ScrollViewer.VerticalScrollBarVisibility="Disabled" />
                        </Grid>
                    </Flyout>
                </FlyoutBase.AttachedFlyout>          
            
                <Interactivity:Interaction.Behaviors>
                    <Core:DataTriggerBehavior ComparisonCondition="NotEqual"
                                              Binding="{x:Bind ViewModel.SelectedVoteItem, Mode=OneWay}">
                        <components:OpenFlyoutAction TargetObject="{x:Bind agendaDataGrid, Mode=OneWay}" />
                    </Core:DataTriggerBehavior>
                </Interactivity:Interaction.Behaviors>
            
            </Grid:RadDataGrid>

Yana
Telerik team
 answered on 28 Jan 2020
1 answer
251 views

Chart Type: RadCartesianChart

The default Major Y grid lines are dashed.  Is there a way to style these as solid lines instead?  
I can't find a Setter for the DashStyle. 

Applicable UWP XAML below

xmlns:chart ="using:Telerik.UI.Xaml.Controls.Chart"
<Page.Resources>

   <Style TargetType="Line" x:Key="TChartGridLineStyle">
      <Setter Property="Stroke" Value="Gray"/>
      <Setter Property="StrokeThickness" Value="1"/>
   </Style>
</Page.Resources>

<chart:RadCartesianChart x:Name="TChart" >                           

<chart:RadCartesianChart.Grid>
      <chart:CartesianChartGrid MajorLinesVisibility="XY" MajorYLineStyle="{StaticResource ResourceKey=TChartGridLineStyle}" />
   </chart:RadCartesianChart.Grid>

</chart:RadCartesianChart>

 

Mark
Top achievements
Rank 1
 answered on 26 Jan 2020
3 answers
231 views

I'm using WPF to create an application that will using drag and drop elements from a large image.  For example I have a image of a panel and I want to be able to drag and drop sections of the image over to another image and drop it.  This action will trigger some underlying work.

I'm not really sure of the best way to do this with WPF and/or if there are any helpful Telerik UI WPF controls that will make this process easier.  My thought is:

1.  Sub divide my main large image into smaller individual images.

2.  Organize the smaller images using a control (here is where I'm not really sure what control to use) such that they can position next to each other making up what would appear to be a single "seamless" large image (kinda like a completed jigsaw puzzle but all the pieces are rectangular).

3.  User can drag and drop the image onto another image (which would be sub divided also), this would then trigger some internal process on the drop.

OR 

...is there some more refined/better approach where all I need to do is define hotspots for a single image and do a drag/drop operation that uses the defined hotspot area/coordinates?

Thoughts?

Cheers, Rob.

Martin Ivanov
Telerik team
 answered on 09 Jan 2020
1 answer
75 views

I'd like to be able to not show a group header if the group contains only 1 row. Using the grouping examples I am able to show a different header based on the number of children in the group, but can not see how to not show any header for single item groups.

 

Thanks

 

Yana
Telerik team
 answered on 09 Jan 2020
3 answers
126 views

Hello,

I was somewhat puzzled by the relatively short list of controls Telerik provide for UWP desktop apps 21 vs. the list of controls for WPF which is 92 (or so).

Was the list of controls restricted because of interchangeability with other platforms?

Cheers, Rob.

Yana
Telerik team
 answered on 16 Dec 2019
3 answers
47 views

Hi all

I have been looking for an example of how to open a radial menu as a context menu from a Telerik RadDataGrid but cannot seem to find one.

Does anybody have one?

Thanks

Yana
Telerik team
 answered on 31 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?