or
<
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
>
<
Window
x:Class
=
"LabelTemplate_MultiBinding.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local
=
"clr-namespace:LabelTemplate_MultiBinding"
Title
=
"MainWindow"
Height
=
"768"
Width
=
"1024"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
telerik:RadCartesianChart
x:Name
=
"PropertyChart"
>
<
telerik:RadCartesianChart.Resources
>
<
local:ChartNumberFormatter
x:Key
=
"NumberFormatter"
/>
<
DataTemplate
x:Key
=
"FormattedNumericAxisTemplate"
>
<
TextBlock
>
<
TextBlock.Text
>
<
MultiBinding
Converter
=
"{StaticResource NumberFormatter}"
>
<
Binding
/>
<
Binding
ElementName
=
"PropertyChart"
Path
=
"DataContext.NumericFormat"
/>
</
MultiBinding
>
</
TextBlock.Text
>
</
TextBlock
>
</
DataTemplate
>
</
telerik:RadCartesianChart.Resources
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
LabelTemplate
=
"{StaticResource FormattedNumericAxisTemplate}"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Series
>
<
telerik:LineSeries
CategoryBinding
=
"Date"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding Path=Series1}"
>
</
telerik:LineSeries
>
</
telerik:RadCartesianChart.Series
>
</
telerik:RadCartesianChart
>
<
StackPanel
Grid.Row
=
"1"
Orientation
=
"Horizontal"
>
<
Label
>Y Axis Format:</
Label
>
<
TextBox
Text
=
"{Binding NumericFormat}"
Width
=
"200"
/>
</
StackPanel
>
</
Grid
>
</
Window
>
public
class
MyPoint
{
public
DateTime Date {
get
;
set
; }
public
Double Value {
get
;
set
; }
}
public
partial
class
MainWindow : Window, INotifyPropertyChanged
{
public
List<MyPoint> Series1 {
get
;
private
set
; }
private
string
_NumericFormat;
public
string
NumericFormat
{
get
{
return
_NumericFormat; }
set
{
if
(_NumericFormat != value)
{
_NumericFormat = value;
OnPropertyChanged(
"NumericFormat"
);
}
}
}
public
MainWindow()
{
Series1 =
new
List<MyPoint>();
for
(
int
i = 0; i < 5; i++)
{
DateTime date = DateTime.Today.AddDays(i);
Series1.Add(
new
MyPoint() { Date = date, Value = i * 1000 });
}
InitializeComponent();
DataContext =
this
;
}
#region INotifyPropertyChanged
public
event
PropertyChangedEventHandler PropertyChanged;
protected
virtual
void
OnPropertyChanged(
string
propertyName =
""
)
{
if
(PropertyChanged !=
null
)
{
PropertyChanged(
this
,
new
PropertyChangedEventArgs(propertyName));
}
}
#endregion
}
public
class
ChartNumberFormatter : IMultiValueConverter
{
public
object
Convert(
object
[] values, Type targetType,
object
parameter, System.Globalization.CultureInfo culture)
{
double
number = System.Convert.ToDouble(values[0]);
string
format = values[1]
as
string
;
if
(
string
.IsNullOrEmpty(format))
{
return
number.ToString();
}
return
number.ToString(format);
}
public
object
[] ConvertBack(
object
value, Type[] targetTypes,
object
parameter, System.Globalization.CultureInfo culture)
{
throw
new
NotImplementedException();
}
}
public
static
void
ShowInSeparateThread(Type windContent,
string
windowTitle,
int
width = 900,
int
height = 700)
{
var _viewerThread =
new
Thread(
delegate
()
{
var _eventAggregg = ServiceLocator.Current.GetInstance<IEventAggregator>();
_eventAggregg.GetEvent<ShowModalPopUp>().Publish(
true
);
var _win =
new
Window
{
Title = windowTitle,
DataContext =
new
WindowDataContext(),
WindowStartupLocation = WindowStartupLocation.CenterScreen,
WindowStyle = WindowStyle.None,
Style = Application.Current.FindResource(
"PopUpWindowStyle"
)
as
Style,
Padding =
new
Thickness(0),
Margin =
new
Thickness(0),
ResizeMode = ResizeMode.NoResize,
Content = ServiceLocator.Current.GetInstance(windContent),
Width = width,
Height = height,
ShowInTaskbar =
false
};
typeof
(Window)
.InvokeMember(
"_ownerHandle"
,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetField,
null
, _win,
new
object
[] { Process.GetCurrentProcess().MainWindowHandle });
_win.ShowDialog();
_eventAggregg.GetEvent<ShowModalPopUp>().Publish(
false
);
})
{
IsBackground =
true
};
_viewerThread.SetApartmentState(ApartmentState.STA);
_viewerThread.Start();
}
}
<
telerik:RadTreeListView
ItemsSource
=
"{Binding Path=MyFirstList}"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding ChildVMs}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Name"
UniqueName
=
"Name"
IsSortable
=
"True"
SortingState
=
"Ascending"
IsReadOnly
=
"True"
DataMemberBinding
=
"{Binding Name}"
/>
<
telerik:GridViewDataColumn
Header
=
"Value"
TextAlignment
=
"Right"
DataMemberBinding
=
"{Binding CurrentValue, Mode=TwoWay}"
>
<
telerik:GridViewDataColumn.Footer
>
<
TextBlock
FontSize
=
"12"
VerticalAlignment
=
"Top"
HorizontalAlignment
=
"Right"
Text
=
"{Binding Path=SomeOtherNumber, Mode=OneWay}"
/>
</
telerik:GridViewDataColumn.Footer
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Timeline"
Width
=
"*"
IsReadOnly
=
"True"
CellTemplateSelector
=
"{StaticResource TimelineTemplateSelector}"
CellStyle
=
"{StaticResource TimelineCellStyle}"
FooterCellStyle
=
"{StaticResource TimelineFooterStyle}"
>
<
telerik:GridViewDataColumn.Footer
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
telerik:RadHorizontalDataAxis
Stroke
=
"DarkRed"
Foreground
=
"Gray"
... />
</
telerik:GridViewDataColumn.Footer
>
</
telerik:GridViewDataColumn
>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
<!-- some other content -->
<
telerik:RadTreeListView
ItemsSource
=
"{Binding Path=MySecondList}"
>
<!-- similar to the first list -->
</
telerik:RadTreeListView
>
public
class
BackstageViewModel : IViewModel {
public
RecentFileList RecentFiles {
get
;
set
; }
// the property I want to point to
public
BackstageViewModel(ApplicationCommandProxy commandProxy, DataHolder data)
{
//random setup stuff
}
//and so on...
}
<
ItemsControl
Name
=
"RecentItem"
DataContext
=
"{Binding ssm:BackstageViewModel}"
ItemsSource
=
"{Binding RecentFiles.RecentFiles}"
Focusable
=
"True"
DisplayMemberPath
=
"RecentFiles"
>
<
ItemsControl.Template
>
<
ControlTemplate
>
<
telerik:RadRibbonButton
Width
=
"285"
Command
=
"{x:Static commands:ApplicationCommands.RecentDocumentCommand}"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"Resources/Open_16.png"
/>
<
StackPanel
Margin
=
"3 0 0 0"
HorizontalAlignment
=
"Left"
>
<
TextBlock
Margin
=
"0 0 0 2"
Text
=
"Example Study"
/>
<
TextBlock
Foreground
=
"DimGray"
Text
=
"{Binding Path}"
/>
</
StackPanel
>
</
StackPanel
>
</
telerik:RadRibbonButton
>
</
ControlTemplate
>
</
ItemsControl.Template
>
</
ItemsControl
>