or
RadDiagramShape shape=
new
RadDiagramShape();
shape.Geometry= ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);
raddiag.AddShape(shape);
foreach
(RadDiagramShape sample
in
raddiag.Items)
{
sample.Background = newBrush;
}
public
partial
class
PerfPresenter : INotifyPropertyChanged
{
public
static
readonly
DependencyProperty VisiblePeriodStartProperty =
DependencyProperty.Register(
"VisiblePeriodStart"
,
typeof
(DateTime),
typeof
(PerfPresenter));
public
static
readonly
DependencyProperty VisiblePeriodEndProperty =
DependencyProperty.Register(
"VisiblePeriodEnd"
,
typeof
(DateTime),
typeof
(PerfPresenter));
public
DateTime VisiblePeriodStart
{
get
{
return
(DateTime)GetValue(VisiblePeriodStartProperty); }
set
{
SetValue(VisiblePeriodStartProperty, value);
NotifyPropertyChanged(VisiblePeriodStartProperty.Name);
}
}
public
DateTime VisiblePeriodEnd
{
get
{
return
(DateTime)GetValue(VisiblePeriodEndProperty); }
set
{
SetValue(VisiblePeriodEndProperty, value);
NotifyPropertyChanged(VisiblePeriodEndProperty.Name);
}
}
public
PerfPresenter()
{
this
.DataContext =
this
;
InitializeComponent();
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
NotifyPropertyChanged(String info)
{
if
(PropertyChanged !=
null
)
{
PropertyChanged(
this
,
new
PropertyChangedEventArgs(info));
}
}
}
<UserControl x:Class="Microsoft.Office.Engineering.PerfPresenter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Microsoft.Office.Engineering"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid x:Name="PerfGrid" DataContext="{Binding}">
<
telerik:RadTimeBar
x:Name
=
"radTimeBar"
DataContext
=
"{Binding}"
Grid.Column
=
"1"
Background
=
"Transparent"
ItemIntervalChanged
=
"RadTimeBar_ItemIntervalChanged"
PeriodStart
=
"{Binding PeriodStart, Mode=OneWay}"
PeriodEnd
=
"{Binding PeriodEnd, Mode=OneWay}"
VisiblePeriodStart
=
"{Binding VisiblePeriodStart, Mode=TwoWay}"
VisiblePeriodEnd
=
"{Binding VisiblePeriodEnd,Mode=TwoWay}"
Selection
=
"{Binding TimeSelection, Mode=OneWayToSource}"
MinSelectionRange
=
"{Binding MinimumSelectionRange, Mode=OneWay}"
SelectionChanged
=
"TimeBarSelectionChanged"
MinZoomRange
=
"{Binding ActualMinZoomRange, Mode=OneWayToSource}"
MouseDoubleClick
=
"RadTimeBarMouseDoubleClick"
VisiblePeriodChanged
=
"RadTimeBarVisiblePeriodChanged"
>
<
telerik:RadTimeBar.Margin
>
<
Thickness
Left
=
"0"
Right
=
"{x:Static SystemParameters.VerticalScrollBarWidth}"
Top
=
"0"
Bottom
=
"0"
/>
</
telerik:RadTimeBar.Margin
>
<
telerik:RadTimeBar.Intervals
>
<
telerik:MinuteInterval
IntervalSpans
=
"1, 5, 10, 15"
/>
</
telerik:RadTimeBar.Intervals
>
<
Grid
x:Name
=
"radTimeBarGrid"
>
</
Grid
>
</
telerik:RadTimeBar
>
</Grid>
</UserControl>
<
telerik:RadTimeBar
DataContext="{Binding}" Intervals
=
"{Binding Intervals, Mode=OneWayToSource}"
/>
<tk:RadGridView Name="RoutesGrid" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding PagedSource, ElementName=DataPager}" SelectedItem="{Binding SelectedRoute}" tk:StyleManager.Theme="Summer" MouseRightButtonDown="RadGridView_MouseRightButtonDown"> <!--<tk:RadGridView.GroupDescriptors> <tk:ColumnGroupDescriptor Column="{Binding Columns[\Reading Station\], ElementName=RoutesGrid}" /> </tk:RadGridView.GroupDescriptors>--> <tk:RadGridView.Columns> <tk:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" TextAlignment="Center"> </tk:GridViewDataColumn> <tk:GridViewDataColumn Header="Reading Station" DataMemberBinding="{Binding ReadingWorkstation, Converter={StaticResource WorkstationToNameConverter}}" TextAlignment="Center" Width="Auto">