void UpdateDatePreference()
 {
     if (DateElement.GetSelectedItem() != null)
     {
         FilterPreferences.Date = (DateTime)DateElement.GetSelectedItem();
     }
     else
     {
         FilterPreferences.Date = null;
     }
 }