Ejemplo n.º 1
0
 public ActivitiesFilteredComboBox()
 {
     //TextSearch.TextPath="Name"
     TextSearch.SetTextPath(this, "Name");
     SelectedValuePath  = "GlobalId";
     ItemTemplate       = (DataTemplate)Application.Current.Resources["ActivitiesComboBoxItem"];
     ItemContainerStyle = (Style)Application.Current.Resources["StretchedComboBoxItemStyle"];
 }
Ejemplo n.º 2
0
        //Bind the lists to the listbox elements
        void ListBoxBindLists()
        {
            try
            {
                lb_Games.IsTextSearchEnabled       = true;
                lb_Games.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Games, "Name");
                lb_Games.ItemsSource = List_Games;

                lb_Apps.IsTextSearchEnabled       = true;
                lb_Apps.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Apps, "Name");
                lb_Apps.ItemsSource = List_Apps;

                lb_Emulators.IsTextSearchEnabled       = true;
                lb_Emulators.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Emulators, "Name");
                lb_Emulators.ItemsSource = List_Emulators;

                lb_Launchers.IsTextSearchEnabled       = true;
                lb_Launchers.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Launchers, "Name");
                lb_Launchers.ItemsSource = List_Launchers;

                lb_Shortcuts.IsTextSearchEnabled       = true;
                lb_Shortcuts.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Shortcuts, "Name");
                lb_Shortcuts.ItemsSource = List_Shortcuts;

                lb_Processes.IsTextSearchEnabled       = true;
                lb_Processes.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Processes, "Name");
                lb_Processes.ItemsSource = List_Processes;

                lb_ColorPicker.ItemsSource = List_ColorPicker;

                lb_Search.IsTextSearchEnabled       = true;
                lb_Search.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_Search, "Name");
                lb_Search.ItemsSource = List_Search;

                lb_FilePicker.IsTextSearchEnabled       = true;
                lb_FilePicker.IsTextSearchCaseSensitive = false;
                TextSearch.SetTextPath(lb_FilePicker, "Name");
                lb_FilePicker.ItemsSource = List_FilePicker;

                lb_ProfileManager.IsTextSearchEnabled       = true;
                lb_ProfileManager.IsTextSearchCaseSensitive = false;
            }
            catch { }
        }
    public void myAfterLoaded()
    {
        if (myTableOfStates == null)
        {
            myTableOfStates = new DataTable();
        }
        CallProcedureToPopulateStates(myTableOfStates);

        ItemsSource = myTableOfStates.DefaultView;
        // AFTER the object is created, and all default styles attempted to be set,
        // FORCE looking for the resource of the "DataTemplate" in the themes.xaml file
        object tryFindObj = TryFindResource("myStateComboTemplate");

        if (tryFindObj is DataTemplate)
        {
            ItemTemplate = (DataTemplate)tryFindObj;
        }

        // NOW, the CRITICAL component missed in the source code
        TextSearch.SetTextPath(this, "StateAbbrev");
    }