This question is locked. New answers and comments are not allowed.
First I have to say, I expect I'm missing something very simple, this just seems like too much of a need...
I have a RadTileView object in my XAML:
This all works very well. But one of my requirements is to change the background color of the header based on a value in my ViewModel, basically the type of the contact. So in my VM I have a property called TypeColor:
The TypeColor is set when the object is added to the TileItems ObservableCollection.
Once I change the XAML to bind to the TypeColor property like this:
It does not bind, and basically used the details color (based on my Theme).
PLEASE HELP!
I have a RadTileView object in my XAML:
<
telerik:RadTileView
x:Name
=
"contactCardTileView"
MinimizedColumnWidth
=
"200"
MaxWidth
=
"700"
MaxHeight
=
"300"
MaxColumns
=
"3"
ItemsSource
=
"{Binding TileItems}"
>
<
telerik:RadTileView.HeaderStyle
>
<
Style
TargetType
=
"TileView:TileViewItemHeader"
>
<
Setter
Property
=
"Background"
Value
=
"PaleGreen"
/>
</
Style
>
</
telerik:RadTileView.HeaderStyle
>
<
telerik:RadTileView.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"../Assets/Images/GeneralContact.png"
Height
=
"25"
/>
<
TextBlock
Text
=
"{Binding FullName}"
Margin
=
"5"
VerticalAlignment
=
"Center"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadTileView.ItemTemplate
>
<
telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
my:ContactCard
Margin
=
"5,2"
/>
</
DataTemplate
>
</
telerik:RadTileView.ContentTemplate
>
</
telerik:RadTileView
>
This all works very well. But one of my requirements is to change the background color of the header based on a value in my ViewModel, basically the type of the contact. So in my VM I have a property called TypeColor:
public
Color TypeColor
{
get
{
return
_typeColor; }
set
{
if
(_typeColor == value)
return
;
_typeColor = value;
RaisePropertyChanged(() => TypeColor);
}
}
Once I change the XAML to bind to the TypeColor property like this:
<
telerik:RadTileView.HeaderStyle
>
<
Style
TargetType
=
"TileView:TileViewItemHeader"
>
<
Setter
Property
=
"Background"
Value
=
"{Binding TypeColor}"
/>
</
Style
>
</
telerik:RadTileView.HeaderStyle
>
It does not bind, and basically used the details color (based on my Theme).
PLEASE HELP!