or
<UserControl x:Class="SprintAnalyzer.Module.Presentation.Views.MiddleView" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:prism="clr-namespace:Microsoft.Practices.Prism.Interactivity.InteractionRequest;assembly=Microsoft.Practices.Prism.Interactivity" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:interactions="clr-namespace:SprintAnalyzer.Module.Presentation.Interactions" xmlns:Views="clr-namespace:SprintAnalyzer.Module.Presentation.Views" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid x:Name="LayoutRoot" Background="Lavender"> <telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="True" ItemsSource="{Binding Path=AnalysisResults}" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Result}" Header="Result"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Category}" Header="Category"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid></UserControl>xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" my project already has a reference to the Telerik.Windows.Code, Telerik.Windows.Controls.GridView and Telerik.Windows.Controls.Input. using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Input;using Microsoft.Practices.Prism.Commands;using Microsoft.Practices.Prism.Events;using SprintAnalyzer.Common;using SprintAnalyzer.Common.Service;using SprintAnalyzer.Module.Presentation.Models;using SprintAnalyzer.Module.Presentation.Requests;using SprintAnalyzer.RulesEngine;using SprintAnalyzer.Common.Events;namespace SprintAnalyzer.Module.Presentation.ViewModels{ public class MiddleViewModel : ViewModelBase { private readonly IEventAggregator _eventAggregator; private ICommand _button; public string Output { get; private set; } public ICommand OnClick { get { return _button; } set { _button = value; RaisePropertyChangedEvent("OnClick"); } } public MiddleViewModel(IApplicationContextService contextService, IEventAggregator eventAggregator) { this._contextService = contextService; this._eventAggregator = eventAggregator; this.OnClick = new DelegateCommand(this.Button_Clicked); _eventAggregator.GetEvent<AnalysisRunTrigger>().Subscribe(ExecuteAnalysisRunTrigger, ThreadOption.BackgroundThread); _eventAggregator.GetEvent<AnalysisResultEvent>().Subscribe(OnAnalysisRunResult, ThreadOption.UIThread); _eventAggregator.GetEvent<ExceptionRaisedEvent>().Subscribe(OnExceptionRaised, ThreadOption.UIThread); this.AnalysisResults = new ObservableCollection<AnalysisResult>(); } private void OnExceptionRaised(ExceptionDetail obj) { // Removed for now } private void OnAnalysisRunResult(AnalysisResult analysisResult) { AnalysisResults.Add(analysisResult); } private static Person CreatePerson() { // Removed for now } private void SetPeopleExecute() { // Removed for now } private void GetPersonCallback(Person p) { // Removed for now } private void CancelCallback() { // Removed for now } private ObservableCollection<AnalysisResult> _analysisResults; public ObservableCollection<AnalysisResult> AnalysisResults { get { return _analysisResults; } set { _analysisResults = value; RaisePropertyChangedEvent("AnalysisResults"); } } private void ExecuteAnalysisRunTrigger(string triggerState) { try { switch (triggerState) { case "StartAnalyzis": rulesFactory.Execute(); break; } } catch (Exception ex) { _eventAggregator.GetEvent<ExceptionRaisedEvent>().Publish(new ExceptionDetail() { Message = ex.Message }); } } private string _message; private readonly IApplicationContextService _contextService; public string Message { get { return _message; } set { _message = value; RaisePropertyChangedEvent("Message"); } } private void Button_Clicked() { //throw new NotImplementedException(); } }}
IsDragPreviewEnabled="True"Telerik.Windows.Documents.Spreadsheet.Model.Worksheet sheet; sheet.Shapes ? Telerik.Windows.Controls.RadSpreadsheet r; r.ActiveWorksheet.Shapes ?
<telerik:TimelineViewDefinition ShowTimeRuler="True" TimerulerGroupStringFormat="{}{0:dddd, dd/MM/yyyy}" TimerulerMajorTickStringFormat="{}{0:%H}" TimerulerMinorTickStringFormat=":{0:%m}" VisibleDays="{Binding ElementName=TimeBar, Path=Selection, Converter={StaticResource VisibleDaysConverter}}" StretchAppointments="True" StretchGroupHeaders="True" DayStartTime="07:00" DayEndTime="20:00" MajorTickLength="1h" MinorTickLength="15min" MinTimeRulerExtent="50" MaxTimeRulerExtent="Infinity" FirstDayOfWeek="Monday" /><Style TargetType="telerik:GridViewIndentCell"> <Setter Property="Visibility" Value="Collapsed"/></Style><telerik:RadTabControl Width="Auto" Height="Auto" x:Name="TabRegion" Prism:RegionManager.RegionName="{x:Static inf:RegionNames.TabRegion}" AllowDragReorder="True" SelectedItemRemoveBehaviour="SelectPrevious" ItemContainerStyle="{DynamicResource RadTabItemStyle1}" ScrollMode="Viewport" OverflowMode="Scroll" DropDownDisplayMode="WhenNeeded" SelectedIndex="{Binding SelectedDashboardTab, Mode=TwoWay}"/><Style x:Key="RadTabItemStyle1" TargetType="{x:Type telerik:RadTabItem}"> <Setter Property="MinWidth" Value="50"/> <!-- Setter Property="BorderThickness" Value="{StaticResource TabItem_OuterBorderThickness}"/ --> <Setter Property="Foreground" Value="White"/> <Setter Property="MinHeight" Value="30"/> <Setter Property="Background"> <Setter.Value> <SolidColorBrush Color="#FF00659E"/> </Setter.Value> </Setter> <!-- Setter Property="BorderBrush" Value="{StaticResource TabItem_OuterBorder_Normal}"/ --> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="10 0"/> <Setter Property="IsTabStop" Value="False"/> <Setter Property="Header" Value="{Binding DataContext.ViewTitle, UpdateSourceTrigger=PropertyChanged}"/> <Setter Property="Height" Value="30" /> <Setter Property="IsSelected" Value="{Binding DataContext.IsTabSelected, Mode=TwoWay}"/> <!-- Setter Property="DropDownContent" Value="{Binding DataContext.ViewTitle, UpdateSourceTrigger=PropertyChanged}"/ --> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <ContentControl Content="{Binding}" /> <telerik:RadButton Grid.Column="1" Width="14" Height="14" Margin="5 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10" Foreground="Black" Background="White" l:RoutedEventHelper.EnableRoutedClick="True" Padding="0" Focusable="False" > <Image Source="/Dashboard;component/Images/delete_icon.png" Width="10" Height="10" Focusable="False"/> </telerik:RadButton> </Grid> </DataTemplate> </Setter.Value> </Setter> <Setter Property="Template" Value="{DynamicResource RadTabItemControlTemplate2}"/></Style><ControlTemplate x:Key="RadTabItemControlTemplate2" TargetType="{x:Type telerik:RadTabItem}"> <Grid x:Name="wrapper"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStateGroup"> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverVisual"/> </Storyboard> </VisualState> <VisualState x:Name="Normal"/> <VisualState x:Name="Selected"> <Storyboard> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectionVisual"/> <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverVisual"/> </Storyboard> </VisualState> <VisualState x:Name="SelectedMouseOver"> <Storyboard> <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverVisual"/> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectionVisual"/> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="SelectionVisual"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <SolidColorBrush Color="#FFFFC92B"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <DoubleAnimation Duration="0:0:0.1" To="0.3" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HeaderElement"/> <DoubleAnimation Duration="0:0:0.1" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalVisual"/> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="PlacementStates"> <VisualState x:Name="HorizontalTop"/> <VisualState x:Name="HorizontalLeft"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="180"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="HorizontalRight"/> <VisualState x:Name="HorizontalBottom"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="180"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="VerticalTop"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="-90"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="VerticalLeft"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="90"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="VerticalRight"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="-90"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="VerticalBottom"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="LayoutTransform" Storyboard.TargetName="OrientationTransform"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <RotateTransform Angle="-90"/> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="FocusStates"> <VisualState x:Name="Unfocused"/> <VisualState x:Name="Focused"/> </VisualStateGroup> <VisualStateGroup x:Name="ValidationStates"/> </VisualStateManager.VisualStateGroups> <Border x:Name="NormalVisual" CornerRadius="0" Margin="0,2,0,0" Background="Black" BorderBrush="#05C33F3F" Height="28"> <Border BorderBrush="#FF002564" BorderThickness="1,1,1,0" CornerRadius="0" Background="#FF004D78"/> </Border> <Border x:Name="MouseOverVisual" BorderBrush="Black" BorderThickness="1,1,1,0" CornerRadius="0" Margin="0,2,0,0" Opacity="0" Background="#FF5FC2FA"> <Border BorderThickness="1,1,1,0" CornerRadius="0" BorderBrush="#00000000"/> </Border> <Border x:Name="SelectionVisual" BorderBrush="#00000000" BorderThickness="1,1,1,0" CornerRadius="0" Margin="0" Opacity="0" Background="Black"> <Border BorderBrush="Blue" BorderThickness="0,0,0,0" CornerRadius="0" Background="#FF0479BA"/> </Border> <telerik:LayoutTransformControl x:Name="OrientationTransform" IsTabStop="False"> <ContentPresenter x:Name="HeaderElement" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> </telerik:LayoutTransformControl> </Grid> </ControlTemplate>