This is a migrated thread and some comments may be shown as answers.

Exception at start application

1 Answer 71 Views
DataBar
This is a migrated thread and some comments may be shown as answers.
Stefano
Top achievements
Rank 1
Stefano asked on 21 Mar 2015, 08:30 PM
I've added a simply line of Databar control, but when I run the application, an exception id fired:

https://www.dropbox.com/s/8ptw82rm7ui0wth/Screenshot%202015-03-21%2021.28.39.png?dl=0

that the code of xaml:
<Window x:Class="HierarchicalGroupingAndFilteringWithTreeView.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:HierarchicalGroupingAndFilteringWithTreeView"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow" WindowState="Maximized">
    <Window.DataContext>
        <local:ViewModel />
    </Window.DataContext>
    <Window.Resources>
        <Style TargetType="telerik:RadTreeViewItem">
            <Setter Property="IsExpanded" Value="True" />
            <Setter Property="Margin" Value="0 2 0 2" />
        </Style>
        <DataTemplate x:Key="Team">
            <Grid>

                <TextBlock Text="{Binding Name}" />
            </Grid>
        </DataTemplate>
        <HierarchicalDataTemplate x:Key="Division" ItemTemplate="{StaticResource Team}" ItemsSource="{Binding Teams}">
            <TextBlock Text="{Binding Name}" />
        </HierarchicalDataTemplate>
        <telerik:GroupHeaderTemplateSelector x:Key="CustomGroupHeaderContentTemplateSelector">
            <telerik:GroupHeaderTemplateSelector.HorizontalTemplate>
                <DataTemplate>
                    <ContentPresenter Content="{Binding FormattedName}" Height="16" Margin="4"/>
                </DataTemplate>
            </telerik:GroupHeaderTemplateSelector.HorizontalTemplate>
            <telerik:GroupHeaderTemplateSelector.VerticalTemplate>
                <DataTemplate>
                    <ContentPresenter Content="" Height="16" VerticalAlignment="Top" />
                </DataTemplate>
            </telerik:GroupHeaderTemplateSelector.VerticalTemplate>
        </telerik:GroupHeaderTemplateSelector>
    </Window.Resources>

    <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <telerik:RadDataBar Width="200" Height="30" VerticalAlignment="Top"></telerik:RadDataBar>

        <telerik:RadTreeView Grid.Row="1" ItemsSource="{Binding TreeViewItems}" ItemTemplate="{StaticResource Division}" Margin="-5,78,5,22">
            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding EventName="Expanded" Command="{Binding ExpandedCommand}" PassEventArgsToCommand="True" />
                <telerik:EventBinding EventName="Collapsed" Command="{Binding CollapsedCommand}"  PassEventArgsToCommand="True"/>
            </telerik:EventToCommandBehavior.EventBindings>
        </telerik:RadTreeView>
        <telerik:RadScheduleView Grid.Column="1" Grid.Row="1" 
                                 AppointmentsSource="{Binding Appointments}" 
                                 ResourceTypesSource="{Binding ResourceTypes}"
                                 GroupHeaderContentTemplateSelector="{StaticResource CustomGroupHeaderContentTemplateSelector}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:TimelineViewDefinition GroupFilter="{Binding GroupFilter}"
                                                MinorTickLength="30min" MajorTickLength="30min"  DayStartTime="7:30:00" DayEndTime="17:30:00" VisibleDays="1"  SmallChangeInterval="3d"/>
                <telerik:DayViewDefinition MinorTickLength="30min" MajorTickLength="30min"/>

            </telerik:RadScheduleView.ViewDefinitions>
            <telerik:RadScheduleView.GroupDescriptionsSource>
                <telerik:GroupDescriptionCollection>
                    <telerik:ResourceGroupDescription ResourceType="Common" />
                </telerik:GroupDescriptionCollection>
            </telerik:RadScheduleView.GroupDescriptionsSource>
            <telerik:RadScheduleView.DragDropBehavior>
                <local:ConflictCheckingDragDropBehavior  />
            </telerik:RadScheduleView.DragDropBehavior>
        </telerik:RadScheduleView>
    </Grid>

</Window>


1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 23 Mar 2015, 09:14 AM
Hello Stefano,

Thank you for the attached xaml. Unfortunately, I was unable to reproduce the exception that you described. I created a small project based on the code you provided and I had to comment out somethings, because I do not have the code behind. I am left with a pretty simple xaml, where one data bar is used and when I run the project - everything is rendered properly and no exception is thrown.

Could you please modify the project to reproduce the faulty behavior and send it back to us for investigation? Can you also specify the exact version you are using and whether it is the no-xaml variant. Thank you!

Regards,
Petar Marchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DataBar
Asked by
Stefano
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or