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
450
Different Datatemplates
posted

Hi.

Here is a problem that I have:

My XamTilesControl is bound to ObservableCollection containing collection of two object types implemaning an interface.

I am able to switch a DataTemplate of each object using ItemTemplateSelector but it works for all tile states (ItemTemplateMaximized,ItemTemplateMinimized....). I want to distinguish also the tile state. please help. Thanks,

Here is the code that I used:

    public class MonitorableObjectSelector : DataTemplateSelector
    {
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var monitorableObject = item as IMonitorable;
            if (monitorableObject == null)
                return null;
            if (monitorableObject.GetType().ToString().Contains("Generator"))
            {
                return Application.Current.Resources["Generator"] as DataTemplate;
            }
            if (monitorableObject.GetType().ToString().Contains("Tank"))
            {
                return Application.Current.Resources["Tank"] as DataTemplate;
            }
            return null;
           
        }

    }

---------

        <igTiles:XamTilesControl  ItemsSource="{Binding MonitorableObjects}"    
                                           
                        ItemTemplateSelector="{StaticResource templateSelector}"             
                           ItemTemplateMaximized="this is the problem" >

        </igTiles:XamTilesControl>

Parents
  • 30945
    Offline posted

    Hello,

     

    I have been looking into the functionality that you are looking for and it seems that it is not currently supported, so I have logged a Feature Request for you directly to our Product Management Team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Your reference number for this feature request is FR13571 and if it is picked up for development you will be notified at that  time.

     

    If you need any further assistance please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

Reply Children
No Data