Click here to Skip to main content
15,887,350 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF Reporting Question Pin
Kevin Marois23-Sep-14 7:07
professionalKevin Marois23-Sep-14 7:07 
AnswerRe: WPF Reporting Question Pin
Bernhard Hiller23-Sep-14 21:56
Bernhard Hiller23-Sep-14 21:56 
GeneralRe: WPF Reporting Question Pin
Kevin Marois24-Sep-14 16:00
professionalKevin Marois24-Sep-14 16:00 
QuestionForm with ComboBoxes bound to the same source. Pin
cjb11016-Sep-14 2:45
cjb11016-Sep-14 2:45 
AnswerRe: Form with ComboBoxes bound to the same source. Pin
Pete O'Hanlon16-Sep-14 3:16
mvePete O'Hanlon16-Sep-14 3:16 
GeneralRe: Form with ComboBoxes bound to the same source. Pin
cjb11016-Sep-14 3:37
cjb11016-Sep-14 3:37 
GeneralRe: Form with ComboBoxes bound to the same source. Pin
Pete O'Hanlon16-Sep-14 6:25
mvePete O'Hanlon16-Sep-14 6:25 
GeneralRe: Form with ComboBoxes bound to the same source. Pin
cjb11017-Sep-14 22:05
cjb11017-Sep-14 22:05 
Ah, well right now we're not using VM. There's not a massive amount of experience, so we want to start slow and with what we're used to, so thats CodeBehind.

I've pasted, the XAML, Code Behind and entity here (given the size didn't seem sensible to flood the forum)
Pastie[^]

So each Unit has three fields (BusinessAreaId, DivisionalUnitId, ParentUnitId), that also reference a Unit, so I would like 3 comboboxes each with a list of units inside, and ideally as you add units, then the combobox items also grow.

My current ef entity load code is:
C#
BackgroundWorker worker = new BackgroundWorker();
//the action to run
worker.DoWork += (s, ev) =>
    {
        this.Dispatcher.Invoke(new Action(() =>
            UIHelper.ProgressBarRun(true)));

        context.Units.Load();
        context.UnitTypes.Load();
        unitNames = new ObservableCollection<UnitName>(
            context.Units.Local.Select(f => new UnitName() { Id = f.Id, Name = f.Name }));
    };
//what to run when the above completes
worker.RunWorkerCompleted += (s, ev) =>
    {
        viewSource.Source = context.Units.Local;
        unitTypeIdComboBox.ItemsSource = context.UnitTypes.Local;

        businessAreaIdComboBox.ItemsSource = unitNames;
        divisionalUnitIdComboBox.ItemsSource = unitNames;
        parentUnitIdComboBox.ItemsSource = unitNames;

        this.Dispatcher.Invoke(new Action(() =>
            {
                UIHelper.ProgressBarRun(false);
                navFirstButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            }));
    };
//start the background work
worker.RunWorkerAsync();

AnswerRe: Form with ComboBoxes bound to the same source. Pin
cjb11022-Sep-14 4:29
cjb11022-Sep-14 4:29 
AnswerSubscribing to the PropertyChangedEventHandler of a class in a List from the class holding the List (solved, sort of...) Pin
GuyThiebaut14-Sep-14 1:25
professionalGuyThiebaut14-Sep-14 1:25 
GeneralRe: Subscribing to the PropertyChangedEventHandler of a class in a List from the class holding the List (solved, sort of...) Pin
SledgeHammer0114-Sep-14 9:41
SledgeHammer0114-Sep-14 9:41 
GeneralRe: Subscribing to the PropertyChangedEventHandler of a class in a List from the class holding the List (solved, sort of...) Pin
GuyThiebaut14-Sep-14 10:06
professionalGuyThiebaut14-Sep-14 10:06 
QuestionWPF Reporting Pin
Kevin Marois9-Sep-14 11:21
professionalKevin Marois9-Sep-14 11:21 
AnswerRe: WPF Reporting Pin
Christian Amado10-Sep-14 5:14
professionalChristian Amado10-Sep-14 5:14 
GeneralRe: WPF Reporting Pin
Kevin Marois15-Oct-14 6:26
professionalKevin Marois15-Oct-14 6:26 
AnswerRe: WPF Reporting Pin
Pete O'Hanlon10-Sep-14 5:57
mvePete O'Hanlon10-Sep-14 5:57 
GeneralRe: WPF Reporting Pin
Kevin Marois21-Oct-14 5:56
professionalKevin Marois21-Oct-14 5:56 
GeneralRe: WPF Reporting Pin
Pete O'Hanlon21-Oct-14 6:05
mvePete O'Hanlon21-Oct-14 6:05 
GeneralRe: WPF Reporting Pin
Kevin Marois21-Oct-14 6:16
professionalKevin Marois21-Oct-14 6:16 
GeneralRe: WPF Reporting Pin
Pete O'Hanlon21-Oct-14 6:18
mvePete O'Hanlon21-Oct-14 6:18 
GeneralRe: WPF Reporting Pin
Kevin Marois21-Oct-14 6:20
professionalKevin Marois21-Oct-14 6:20 
AnswerRe: WPF Reporting Pin
Duncan Edwards Jones21-Oct-14 5:59
professionalDuncan Edwards Jones21-Oct-14 5:59 
AnswerRe: WPF Reporting Pin
Pete O'Hanlon21-Oct-14 7:45
mvePete O'Hanlon21-Oct-14 7:45 
AnswerRe: WPF Reporting Pin
Richard J Foster22-Oct-14 5:55
Richard J Foster22-Oct-14 5:55 
AnswerRe: Textblock with autoscrolling Pin
Richard Deeming5-Sep-14 5:24
mveRichard Deeming5-Sep-14 5:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.