or
<
Application.Resources
>
<
ResourceDictionary
Source
=
"/Themes/Telerik.Windows.Controls.Navigation.xaml"
/>
</
Application.Resources
>
public
class
WMSAppointment : IAppointment
{
public
string
Body {
get
;
set
; }
public
ICategory Category {
get
;
set
; }
public
Importance Importance {
get
;
set
; }
public
DateTime End {
get
;
set
; }
public
DateTime Start {
get
;
set
; }
public
string
Subject {
get
;
set
; }
public
IList Resources {
get
;
set
; }
public
int
JobId {
get
;
set
; }
public
bool
IsAllDayEvent {
get
;
set
; }
public
IRecurrenceRule RecurrenceRule {
get
;
set
; }
public
ITimeMarker TimeMarker {
get
;
set
; }
public
TimeZoneInfo TimeZone {
get
;
set
; }
public
event
EventHandler RecurrenceRuleChanged;
public
event
PropertyChangedEventHandler PropertyChanged;
public
bool
Equals(IAppointment other)
{
var otherAppointment = other
as
WMSAppointment;
return
otherAppointment !=
null
&&
other.Start ==
this
.Start &&
other.End ==
this
.End &&
other.Subject ==
this
.Subject &&
this
.JobId == otherAppointment.JobId &&
this
.TimeMarker == otherAppointment.TimeMarker &&
this
.TimeZone == otherAppointment.TimeZone &&
this
.IsAllDayEvent == other.IsAllDayEvent &&
this
.RecurrenceRule == other.RecurrenceRule;
}
public
void
BeginEdit()
{
throw
new
NotImplementedException();
}
public
void
CancelEdit()
{
throw
new
NotImplementedException();
}
public
void
EndEdit()
{
throw
new
NotImplementedException();
}
public
IAppointment Copy()
{
IAppointment appointment =
new
WMSAppointment();
appointment.CopyFrom(
this
);
return
appointment;
}
public
void
CopyFrom(IAppointment other)
{
this
.IsAllDayEvent = other.IsAllDayEvent;
this
.Start = other.Start;
this
.End = other.End;
this
.Subject = other.Subject;
var otherAppointment = other
as
WMSAppointment;
if
(otherAppointment ==
null
)
return
;
this
.JobId = otherAppointment.JobId;
this
.TimeMarker = otherAppointment.TimeMarker;
this
.Resources.Clear();
this
.Resources.AddRange(otherAppointment.Resources);
this
.Body = otherAppointment.Body;
}
}
<
Grid
VerticalAlignment
=
"Top"
>
<
Grid.Resources
>
<
DataTemplate
x:Key
=
"KidDataTemplate"
>
<
View:KidView
KidId
=
"{Binding Id}"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"AdultDataTemplate"
>
<
View:AdultView
AdultId
=
"{Binding Id}"
/>
</
DataTemplate
>
<
selectors:UserDataTemplateSelector
x:Key
=
"UserDataTemplateSelector"
/>
</
Grid.Resources
>
<
StackPanel
Orientation
=
"Vertical"
>
<
telerik:RadGridView
x:Name
=
"grid1"
HorizontalAlignment
=
"Left"
Margin
=
"10,10,0,0"
VerticalAlignment
=
"Top"
RowDetailsTemplateSelector
=
"{StaticResource UserDataTemplateSelector}"
RowDetailsVisibilityMode
=
"Collapsed"
AutoGenerateColumns
=
"True"
/>
<
Border
Grid.Row
=
"1"
BorderBrush
=
"WhiteSmoke"
BorderThickness
=
"5"
>
<
telerik:DetailsPresenter
DetailsProvider
=
"{Binding RowDetailsProvider, ElementName=grid1}"
/>
</
Border
>
</
StackPanel
>
</
Grid
>
public
partial
class
AdultView : UserControl
{
public
int
? AdultId
{
get
{
return
(
int
?)GetValue(AdultIdProperty); }
set
{ SetValue(AdultIdProperty, value); }
}
public
static
readonly
DependencyProperty AdultIdProperty = DependencyProperty.Register(
"AdultId"
,
typeof
(
int
?),
typeof
(AdultView));
public
AdultView()
{
InitializeComponent();
}
protected
override
void
OnRender(DrawingContext drawingContext)
{
base
.OnRender(drawingContext);
if
(AdultId.HasValue)
{
this
.DataContext =
new
RowDetailSample.ViewModel.AdultViewModel(AdultId.Value);
}
}
}
<
Style
TargetType
=
"telerik:RadListBox"
x:Key
=
"ListStyle"
BasedOn
=
"{StaticResource {x:Type telerik:RadListBox}}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}"
Value
=
"0"
>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Top"
/>
<
Setter
Property
=
"Margin"
Value
=
"0, 20, 0, 0"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
>
<
TextBlock
Foreground
=
"DimGray"
TextWrapping
=
"Wrap"
FontSize
=
"14"
>
There are currently no items to show.
</
TextBlock
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
<
telerik:RadListBox
Style
=
"{StaticResource ListStyle}"
>
// items here
</
telerik:RadListBox
>
public
class
SalesInfo
{
public
string
Employee {
get
;
set
; }
public
DateTime Time {
get
;
set
; }
public
int
Value {
get
;
set
; }
}
data =
new
RadObservableCollection<SalesInfo>(data.OrderBy(x => x.Time));
Color dataColor = colorArray[loopCounter % 4];
LineSeries line =
new
LineSeries();
line.Stroke =
new
SolidColorBrush(dataColor);
line.StrokeThickness = 2;
line.CategoryBinding =
new
PropertyNameDataPointBinding() { PropertyName =
"Time"
};
line.ValueBinding =
new
PropertyNameDataPointBinding() { PropertyName =
"Value"
};
line.ItemsSource = data;
var tbiTemplate =
this
.Resources[
"theTemplate"
]
as
DataTemplate;
line.TrackBallInfoTemplate = tbiTemplate;
activitiesAddedChart.Series.Add(line);
<
DataTemplate
x:Key
=
"theTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding DataPoint.SalesInfo.Employee}"
/>
<
TextBlock
Text
=
": "
/>
<
TextBlock
Text
=
"{Binding DataPoint.Value}"
/>
</
StackPanel
>
</
DataTemplate
>
1.In the radrichtextbox , setting the page number, from 1 to N, it could be shown in the radrichtextbox correctly, but when calling window's printing function, all the pages's number is 1.
2.How to transter the Landscape of PrintDialog to the RadRichTectBox.