Click here to Skip to main content
15,909,091 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can we restrict a user from changing the download path url's fine name. Pin
Matt Meyer23-Sep-11 3:06
Matt Meyer23-Sep-11 3:06 
QuestionXML node is not a child of this node.... Pin
mwpeck22-Sep-11 10:46
mwpeck22-Sep-11 10:46 
AnswerRe: XML node is not a child of this node.... Pin
André Kraak22-Sep-11 11:05
André Kraak22-Sep-11 11:05 
GeneralRe: XML node is not a child of this node.... Pin
mwpeck22-Sep-11 11:14
mwpeck22-Sep-11 11:14 
GeneralRe: XML node is not a child of this node.... Pin
André Kraak22-Sep-11 11:32
André Kraak22-Sep-11 11:32 
GeneralRe: XML node is not a child of this node.... Pin
mwpeck22-Sep-11 11:51
mwpeck22-Sep-11 11:51 
GeneralRe: XML node is not a child of this node.... Pin
André Kraak22-Sep-11 12:12
André Kraak22-Sep-11 12:12 
GeneralRe: XML node is not a child of this node.... Pin
mwpeck22-Sep-11 12:18
mwpeck22-Sep-11 12:18 
GeneralRe: XML node is not a child of this node.... Pin
André Kraak22-Sep-11 12:32
André Kraak22-Sep-11 12:32 
GeneralRe: XML node is not a child of this node.... Pin
mwpeck22-Sep-11 12:50
mwpeck22-Sep-11 12:50 
QuestioniTextSharp specify text location Pin
kruegs3522-Sep-11 5:24
kruegs3522-Sep-11 5:24 
AnswerRe: iTextSharp specify text location Pin
André Kraak22-Sep-11 11:20
André Kraak22-Sep-11 11:20 
GeneralRe: iTextSharp specify text location Pin
kruegs3523-Sep-11 2:32
kruegs3523-Sep-11 2:32 
QuestionC#.net 2010 textbox Pin
dcof22-Sep-11 4:49
dcof22-Sep-11 4:49 
AnswerRe: C#.net 2010 textbox Pin
Luc Pattyn22-Sep-11 5:10
sitebuilderLuc Pattyn22-Sep-11 5:10 
AnswerRe: C#.net 2010 textbox Pin
ScottM122-Sep-11 21:23
ScottM122-Sep-11 21:23 
QuestionHow can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
JUNEYT22-Sep-11 2:52
JUNEYT22-Sep-11 2:52 
AnswerRe: How can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
Nagy Vilmos22-Sep-11 3:12
professionalNagy Vilmos22-Sep-11 3:12 
AnswerRe: How can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
Morgs Morgan22-Sep-11 4:21
Morgs Morgan22-Sep-11 4:21 
GeneralRe: How can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
BobJanova26-Sep-11 3:32
BobJanova26-Sep-11 3:32 
GeneralRe: How can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
Morgs Morgan26-Sep-11 3:56
Morgs Morgan26-Sep-11 3:56 
GeneralRe: How can I show an animated loding icon beside teh dropdown box when postback occurs. Pin
BobJanova26-Sep-11 5:54
BobJanova26-Sep-11 5:54 
QuestionWPF MVVM Dispose ViewModel Pin
Flowent5721-Sep-11 22:23
Flowent5721-Sep-11 22:23 
Hi,

I have a treeview with one root node. This node has some children.

The root not is a "TreeViewItemViewModel". This class contains : "ObservableCollection<TreeViewItemViewModel> Items" which are Children nodes.

At beginning, the root node is not expanded and "Children" is empty.

When I expand root node, I load data from DataBase in Children collection :

C#
public override void LoadChildren()
        {
            this.Items.Clear();
            List<Operation> lstOp = DataBAse.GetAllOperations();
            foreach (Operation op in lstOp)
            {
                this.Items.Add(new TreeViewItemViewModel(op));
            }
        }


If I "unexpand" and expand the root node, I reload children...

C#
public bool IsExpanded
        {
            get 
            {
                return _isExpanded; 
            }
            set
            {
                if (value != this._isExpanded)
                {
                    this._isExpanded = value;
                    RaisePropertyChanged("IsExpanded");

                    if (this._isExpanded)
                    {
                        this.LoadChildren();
                    }
                }
            }
        }



My issue : when I call "LoadChildren", Items list is cleared but viewmodel are always in memory...

Can someone help me ?
AnswerRe: WPF MVVM Dispose ViewModel Pin
Pete O'Hanlon22-Sep-11 2:22
mvePete O'Hanlon22-Sep-11 2:22 
GeneralRe: WPF MVVM Dispose ViewModel Pin
Daniel.Grondal22-Sep-11 21:13
Daniel.Grondal22-Sep-11 21:13 

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.