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
160
Header Template (ActivityDialog)
posted

Hi,

I customized the Schedule ActivityDialog, and also created a header template (see below). That worked. Now my problem ist, that i tried to bin the header caption to a class property. This seems not to work. Could you explain me what the easiest way is for changing the Dialog Caption?

Thanks kind regards Daniel

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!-- Header Icon Template für Dialoge -->
    <DataTemplate x:Name="HeaderIconImg">
        <Grid>
            <Ellipse Width="16" Height="16">
                <Ellipse.Fill>
                    <RadialGradientBrush GradientOrigin=".1,.1">
                        <GradientStop Offset="0.3" Color="#ffffff"/>
                        <GradientStop Offset="1" Color="#315ea5"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <TextBlock Text="Tg" FontSize="9" HorizontalAlignment="Center"  VerticalAlignment="Center"/>
        </Grid>
    </DataTemplate>
    <!-- Header Icon Template für Dialoge -->

    <!-- Header Template für Dialoge -->
    <DataTemplate x:Name="HeaderTemplate">
        <StackPanel Background="Aqua">
            <TextBlock Text="{Binding DialogCaption, Mode=OneWay, FallbackValue=[DialogCaption]}"
                       FontSize="10"
                       FontFamily="Arial"
                       FontStyle="Normal"
                       Foreground="Black"
                       VerticalAlignment="Stretch"
                       />
        </StackPanel>
    </DataTemplate>
    <!-- Header Template für Dialoge -->
</ResourceDictionary>