Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1320
Custom header Label for xamdataCards
posted

I have a problem with binding of column header.

It's my class :

public string ErrorMessage { get; set; }

public TimeSpan? Duration { get; set; }

public string DefaultObjectTypeCd { get; set; }

public string DefaultObjectValue { get; set; }

public string ObjectTypes {

get {

string s = string.Empty;

foreach (LogObject o in LogObjects) {

if (string.IsNullOrEmpty(s))

s = o.Type;

else

s += "\n" + o.Type;

}

return s;

}

}

public string ObjectValues

{

get

{

string s = string.Empty;

foreach (LogObject o in LogObjects)

{

if (string.IsNullOrEmpty(s))

s = o.Value;

else

s += "\n" + o.Value;

}

return s;

}

}

and I will to bind ObjectValues properties for value and ObjectTypes as Label of column

<dataPresenter:UnboundField

BindingPath="ObjectValues"

Settings="{StaticResource ObjectHeaderGrid}"/>

and style

<dataPresenter:FieldSettings x:Key="ObjectHeaderGrid">

<dataPresenter:FieldSettings.LabelPresenterStyle>

<Style TargetType="{x:Type dataPresenter:LabelPresenter}" BasedOn="{x:Static igThemes:DataPresenterIGTheme.LabelPresenter}">

<!--<Setter Property="TextBlock.Text" Value="{Binding Path=DataItem.ObjectTypes}" />-->

<Setter Property="Template" >

<Setter.Value>

<ControlTemplate>

<TextBlock Margin="8 2 0 0" Text="{Binding Path=DataItem.ObjectTypes}" />

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</dataPresenter:FieldSettings.LabelPresenterStyle>

</dataPresenter:FieldSettings


The binding it's correct but I lose theme and the theme used for xamdatacards is ==> Theme="IGTheme".


and the result is


The column label is bind but the main theme lose.


Can you help me? how can I recover the main style(theme)??