Ejemplo n.º 1
0
 private void SetFilterSelectionBoxFilter(ref FilterSelectionBox elem, string partId, string listBinding, string filterBinding)
 {
     elem = Template.FindName(partId, this) as FilterSelectionBox;
     if (elem != null)
     {
         BindingTools.SetBinding(elem,
                                 FilterSelectionBox.ItemsListProperty,
                                 mainModel.DatabaseFilters,
                                 listBinding);
         BindingTools.SetBinding(elem,
                                 FilterSelectionBox.FilterPropertiesProperty,
                                 mainModel.AppSettings.FilterSettings,
                                 filterBinding,
                                 BindingMode.TwoWay);
     }
 }
Ejemplo n.º 2
0
        private void SetFilterSelectionBoxFilter(string listBinding, string filterBinding, bool isFullext = true)
        {
            if (PanelItemsHost == null)
            {
                return;
            }

            var elem = new FilterSelectionBox();

            elem.SetResourceReference(FilterSelectionBox.StyleProperty, "FilterPanelFilterSelectionBox");
            BindingTools.SetBinding(elem,
                                    FilterSelectionBox.ItemsListProperty,
                                    mainModel.DatabaseFilters,
                                    listBinding);
            BindingTools.SetBinding(elem,
                                    FilterSelectionBox.FilterPropertiesProperty,
                                    mainModel.AppSettings.FilterSettings,
                                    filterBinding,
                                    BindingMode.TwoWay);
            elem.IsFullTextEnabled = isFullext;
            PanelItemsHost.Children.Add(elem);
        }