Hi,
using the xamDayView, I would like to see, besides the subject, also the description of the appointment. I guess I have to customize the AppointmentPresenter.Style but I couldn't find any sample nor in the feature browser, nor in the online help.Can someone please guide me ?
Best RegardsRoberto Dalmonte
Hi Roberto,
As all our controls you can get the templates for them from DefaultStyles folder where the product is installed i.e. “C:\Program Files\Infragistics\NetAdvantage 2010.3\WPF\DefaultStyles\Schedule”. For AppointmentPresenter and ActivityPresenter you can find them in generic.shared.xaml file. Hope this helps.
Thanks,
Diyan Dimitrov
As you suggested I tried modifying the template. Particularly I modified the activityToolTipTemplate adding a TextBlock with a fake message, saved the modified template. I hoped to see my custom tooltip without success.
<DataTemplate x:Key="activityToolTipTemplate">
<StackPanel Orientation="Vertical" Margin="5,0,3,0">
<StackPanel Orientation="Horizontal">
<igSchedulePrim:ScheduleDateRangePresenter
ConvertDateTimeToLocal="{Binding Path=Activity.IsTimeZoneNeutral, Converter={StaticResource notConverter}}"
FontSize="{Binding Path=ActivityPresenter.FontSize}"
Start="{Binding Path=Activity.Start}"
End="{Binding Path=Activity.End}"
/>
<TextBlock Text="{Binding Path=Activity.Subject}"
Margin="5,0,0,0"
<TextBlock Text="Hello from me"
</StackPanel>
What did I do wrong? My goal is to be able to show something else beyond the Subject (i.e. description) or some graphic symbols before or after the Subject. Can you provide a sample?Roberto
Thank you so much.
Roberto
robdal said: Let me rephrase my question then: since my goal is to custom-color the border of each appointment do you have some sample code on how can I obtain such a goal?
Let me rephrase my question then: since my goal is to custom-color the border of each appointment do you have some sample code on how can I obtain such a goal?
So you would change that such that you either access a property directly on the DataItem of the Activity or use the MetadataPropertyMapping. That primarily depends on whether you want to be able to get/set this from within a new activity since the dataitem won't exist for a new activity until it is committed. Assuming you just want to access a System.Windows.Media.Color property on the DataItem then that path would look something like:
<Path x:Name="BorderPath" Fill="{TemplateBinding ComputedBackground}" StrokeThickness ="{TemplateBinding ComputedBorderStrokeThickness}" igPrim:XamlHelper.SnapsToDevicePixels="True"> <Path.Stroke> <SolidColorBrush Color="{Binding DataItem.BorderColor}" /> </Path.Stroke> </Path>
Or maybe if you know what you will default the bordercolor will be for your data items and you are allowing in place creation of activities you might provide a FallbackValue:
<Path x:Name="BorderPath" Fill="{TemplateBinding ComputedBackground}" StrokeThickness ="{TemplateBinding ComputedBorderStrokeThickness}" igPrim:XamlHelper.SnapsToDevicePixels="True"> <Path.Stroke> <SolidColorBrush> <SolidColorBrush.Color> <Binding Path="DataItem.BorderColor"> <Binding.FallbackValue> <Color>Purple</Color> </Binding.FallbackValue> </Binding> </SolidColorBrush.Color> </SolidColorBrush> </Path.Stroke> </Path>
If you were using the MetadataPropertyMappings then the path would probably look something like:
<Path x:Name="BorderPath" Fill="{TemplateBinding ComputedBackground}" StrokeThickness ="{TemplateBinding ComputedBorderStrokeThickness}" igPrim:XamlHelper.SnapsToDevicePixels="True"> <Path.Stroke> <SolidColorBrush Color="{Binding Metadata[BorderColor]}" /> </Path.Stroke> </Path>
Hi Roberti,
You're right, that's a bug that has been fixed recently. The fix would be available in our next Service Release planned for August 12, 2011. Sorry for the inconvinience.
Since I customized some templates included in the generic.shared.xaml file I added it to my project.
while I can build correctly the silverlight project, the wpf project won't build and would give me the following error:
The property 'ActivityCategoryColorPicker.SelectedColor' cannot be set because it does not have an accessible set accessor. Line 2934 Position 55.D:\Codice\OneClick360\OneClick.WPF\Assets\generic.shared.xaml 2934 55 OneClick.WPF
I thought the generic.shared.xaml file would be neutral to silverlight / wpf. Nonetheless I get the same error even if I pick the generic.shared.xaml file from the WPF folder:
C:\Program Files (x86)\Infragistics\NetAdvantage 2011.1\WPF\DefaultStyles\Schedule
Am I doing something wrong or is this a bug?
Roberto Dalmonte