I was trying latest trial (version 2013.2.724.1050)
And I include implicit windows8 themes (System.Windows.xaml) in the project.
Then somehow some labels showing invalid value for DisplayAttribute, please see attached picture.
Below is my xaml:
My business model:
I need to comment out below entries in System.Windows.xaml (included in Windows8 implicit themes):
After that, DisplayAttribute will work fine.
Any clue on this?
And I include implicit windows8 themes (System.Windows.xaml) in the project.
Then somehow some labels showing invalid value for DisplayAttribute, please see attached picture.
Below is my xaml:
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
<
sdk:Label
Grid.Row
=
"0"
Grid.Column
=
"0"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Target
=
"{Binding ElementName=txtCode}"
/>
<
TextBox
x:Name
=
"txtCode"
Grid.Row
=
"0"
Grid.Column
=
"2"
Width
=
"150"
MaxLength
=
"25"
HorizontalAlignment
=
"Left"
IsReadOnly
=
"True"
Text
=
"{Binding PurchaseOrder.Code}"
/>
<
sdk:Label
Grid.Row
=
"2"
Grid.Column
=
"0"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Target
=
"{Binding ElementName=txtDate}"
/>
<
TextBox
x:Name
=
"txtDate"
Grid.Row
=
"2"
Grid.Column
=
"2"
Width
=
"150"
MaxLength
=
"25"
HorizontalAlignment
=
"Left"
IsReadOnly
=
"True"
Text
=
"{Binding PurchaseOrder.Date}"
/>
My business model:
[Display(Name =
"labelCode"
, ResourceType =
typeof
(Captions))]
public
string
Code
{
get
{
return
_code;
}
set
{
_code = value;
RaisePropertyChanged(
"Code"
);
}
}
private
string
_code;
[Display(Name =
"labelDate"
, ResourceType =
typeof
(Captions))]
public
DateTime? Date
{
get
{
return
_date;
}
set
{
_date = value;
RaisePropertyChanged(
"Date"
);
}
}
private
DateTime? _date;
I need to comment out below entries in System.Windows.xaml (included in Windows8 implicit themes):
<!-- System.Windows.TextBox-->
<Style x:Key=
"TextBoxStyle"
TargetType=
"TextBox"
>
<Setter Property=
"BorderBrush"
Value=
"{telerik:Windows8Resource ResourceKey=BasicBrush}"
/>
<Setter Property=
"Background"
Value=
"{telerik:Windows8Resource ResourceKey=MainBrush}"
/>
<Setter Property=
"Foreground"
Value=
"{telerik:Windows8Resource ResourceKey=MarkerBrush}"
/>
<!-- THESE 2 LINES MAKES DisplayAttributeValue BECOMES INVALID
<Setter Property=
"FontFamily"
Value=
"{telerik:Windows8Resource ResourceKey=FontFamilyStrong}"
/>
<Setter Property=
"FontSize"
Value=
"{telerik:Windows8Resource ResourceKey=FontSize}"
/>
-->
<Setter Property=
"HorizontalContentAlignment"
Value=
"Stretch"
/>
<Setter Property=
"VerticalContentAlignment"
Value=
"Center"
/>
<Setter Property=
"Padding"
Value=
"5 2"
/>
<Setter Property=
"BorderThickness"
Value=
"1"
/>
After that, DisplayAttribute will work fine.
Any clue on this?