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>
Hi Daniel -
I am assuming that 'DialogCaption' is the property that you are having the problem binding to and that it is a property on a custom class created by you. If this is true then you must set the DataContext of your dialog to an instance of your custom class in order for the binding you have specified in the DataTemplate to work. Have you done this?
Joe
Hi Joe,
Yes i did, but it does not work....
Any Ideas?
Thanks Daniel
Are you receiving any binding errors in the Output window?
Hey Joe,
No i do not. Would it be possible to change the Dialog Caption with code behind?
Thanks
I had asked in my original email whether the DialogCaption property is on a custom object that you controlled, and based on your response I assumed it is. If that is the case, you should be able to manipulate that property directly.
If not, perhaps I misunderstood. Is it possible for you to send a small sample that demonstrates the problem?