or
<telerik:RadGridView x:Name="ctlStockGridView" AutoGenerateColumns="False" Background="AliceBlue" telerik:StyleManager.Theme="Office_Blue" ShowInsertRow="False" SelectionMode="Extended"
RowEditEnded="ctlStockGridView_RowEditEnded" ValidatesOnDataErrors="None" ShowGroupPanel="False" IsFilteringAllowed="False" RowValidating="ctlStockGridView_RowValidating" PreparingCellForEdit="ctlStockGridView_PreparingCellForEdit"> <telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Amount}" TextAlignment="Right" UniqueName="Amount" Header="Posting Amount" Width="auto" HeaderTextAlignment="Center" /> </telerik:RadGridView.Columns> </telerik:RadGridView><telerik:RadDropDownButton Content="Assign" DockPanel.Dock="Right" Margin="3" Name="RolesMenu"> <telerik:RadDropDownButton.DropDownContent> <telerik:RadContextMenu ItemsSource="{Binding RolesList}" ItemClick="RolesMenu_ItemClick"> <telerik:RadContextMenu.ItemTemplate> <DataTemplate> <telerik:RadMenuItem Header="{Binding RoleName}" Command="{Binding AssignRole}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Mode=Self}}" /> </DataTemplate> </telerik:RadContextMenu.ItemTemplate> </telerik:RadContextMenu> </telerik:RadDropDownButton.DropDownContent></telerik:RadDropDownButton>public partial class XAxisTest : Window { public XAxisTest() { InitializeComponent(); InitializeComponent(); Context = new Context(); DataContext = this; } public Context Context { get; set; } } public class Context { public Context() { Charts = new ObservableCollection<ChartDataHolder> { new ChartDataHolder(1), new ChartDataHolder(100) }; } public ChartDataHolder FirstData { get { return Charts[0]; } } public ObservableCollection<ChartDataHolder> Charts { get; private set; } } public class ChartDataHolder { public ChartDataHolder(double delta) { ChartData = new ObservableCollection<ChartDataItem>(); for (int i = 0; i < 20; i++) { ChartData.Add(new ChartDataItem() { ValueX = DateTime.Now.Second + i, ValueY = DateTime.Now.Second * delta + i }); } } public ObservableCollection<ChartDataItem> ChartData { get; private set; } } public class ChartDataItem { public int ValueX { get; set; } public double ValueY { get; set; } }<Window>private void grid_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e) { if (e.Column.UniqueName.Equals("SpecificColumn", StringComparison.CurrentCultureIgnoreCase)) { e.Column.CellTemplateSelector = // ... point to C# class that returns datatemplate from resource dictionary file
} }As a newbie to WPF I've been struggled with triggers and animations for a while.
This is my element in the information layer:
<telerik:InformationLayer.ItemTemplate> <DataTemplate> <Grid x:Name="TopLevelGrid" Width="Auto" Height="Auto" telerik:MapLayer.Location="{Binding Location}" telerik:MapLayer.BaseZoomLevel="9"> <ToolTipService.ToolTip><ToolTip><ToolTip.Content> ... </ToolTip.Content></ToolTip></ToolTipService.ToolTip> <Ellipse Name="myEllipse" Width="20" Height="20" Stroke="{Binding Stroke}" StrokeThickness="3"StrokeDashArray="2" Fill="{Binding Fill}" Style="{StaticResource myStyle}" > <telerik:MapLayer.HotSpot><telerik:HotSpot X="0.5" Y="0.5" /></telerik:MapLayer.HotSpot> </Ellipse> </Grid> </DataTemplate> </telerik:InformationLayer.ItemTemplate>
The problem is that I want a property (or event) in my custom class for the element to trigger the animation. So far I've tried to do it both in XAML and in code without success.
I would be grateful if you could give me a hint or two of how to solve the issue.
Regards
Robert