Hello, dear developers!
I got question, can I set property value of DataPager in static resource?
Here's my point of view.
This one is placed in App.xaml.
<
Style
x:Key
=
"DataPagerPageSize"
TargetType
=
"telerik:RadDataPager"
>
<
Setter
Property
=
"telerik:RadDataPager.PageSize"
Value
=
"2"
/>
</
Style
>
And that is on the control
<
telerik:RadDataPager
DisplayMode
=
"FirstLastPreviousNextNumeric"
Source
=
"{Binding Data, ElementName=dds}"
Style
=
"{StaticResource DataPagerPageSize}"
/>
This scenario is not working. So the question is HowTo?
5 Answers, 1 is accepted
0
Hello Le_Roy,
Your style setter is wrong. Please, read this article.
I hope this helps.
Best wishes,
Ross
the Telerik team
Your style setter is wrong. Please, read this article.
I hope this helps.
Best wishes,
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Le_Roy
Top achievements
Rank 2
answered on 06 Sep 2010, 03:17 PM
According to MSDN, their example
And mine
E.g. with RadWindow, RadComboBox such scenario works like a charm.
Perharps its related to Resharper bug, I'll try. Tx for fast reply.
<
Style
TargetType
=
"{x:Type TextBlock}"
>
<
Setter
Property
=
"FontFamily"
Value
=
"Segoe Black"
/>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"FontSize"
Value
=
"12pt"
/>
<
Setter
Property
=
"Foreground"
Value
=
"#777777"
/>
</
Style
>
<
Style
x:Key
=
"DataPagerPageSize"
TargetType
=
"telerik:RadDataPager"
>
<
Setter
Property
=
"telerik:RadDataPager.PageSize"
Value
=
"2"
/>
</
Style
>
E.g. with RadWindow, RadComboBox such scenario works like a charm.
Perharps its related to Resharper bug, I'll try. Tx for fast reply.
0
Hello Le_Roy,
Simply leave PageSize. You do not need the rest:
As you notice the Style carries information about the TargetType so you do not need to specify it each Setter.
Regards,
Ross
the Telerik team
Simply leave PageSize. You do not need the rest:
<
Style
x:Key
=
"DataPagerPageSize"
TargetType
=
"telerik:RadDataPager"
>
<
Setter
Property
=
"PageSize"
Value
=
"2"
/>
</
Style
>
As you notice the Style carries information about the TargetType so you do not need to specify it each Setter.
Regards,
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Le_Roy
Top achievements
Rank 2
answered on 07 Sep 2010, 05:41 AM
Ross, it doesnt works either..
0
Accepted
Hi Le_Roy,
Then open a separate support ticket and send us a sample project which we can debug. Thanks in advance.
Sincerely yours,
Ross
the Telerik team
Then open a separate support ticket and send us a sample project which we can debug. Thanks in advance.
Sincerely yours,
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items