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

WPF

 
QuestionWPF DataGrid Add DataGridTemplateColumn At RunTime Pin
Kevin Marois26-Nov-14 13:02
professionalKevin Marois26-Nov-14 13:02 
AnswerRe: WPF DataGrid Add DataGridTemplateColumn At RunTime Pin
ferragus26-Nov-14 16:54
professionalferragus26-Nov-14 16:54 
Question"Smoothing" out a PolyLine? Pin
SledgeHammer0120-Nov-14 10:17
SledgeHammer0120-Nov-14 10:17 
AnswerRe: "Smoothing" out a PolyLine? Pin
den2k8820-Nov-14 10:37
professionalden2k8820-Nov-14 10:37 
GeneralRe: "Smoothing" out a PolyLine? Pin
SledgeHammer0120-Nov-14 11:01
SledgeHammer0120-Nov-14 11:01 
GeneralRe: "Smoothing" out a PolyLine? Pin
den2k8820-Nov-14 11:07
professionalden2k8820-Nov-14 11:07 
GeneralRe: "Smoothing" out a PolyLine? Pin
SledgeHammer0120-Nov-14 11:50
SledgeHammer0120-Nov-14 11:50 
QuestionTreeView Children Loading Indicator Pin
cjb11019-Nov-14 23:27
cjb11019-Nov-14 23:27 
I've got a WPF TreeView that is using the structure in Josh Smith's article[^]

In my case I've only got one type of object (Unit) that has a self-referencing hierarchy. So I only have one item ViewModel and so only the one HierarchicalDataTemplate.

Everything 'works', but there are two usability issues:
1) clicking on the expander can take a while, and there's nothing to indicate to the user that its happening.
2) the expanders appear on items that have no children (I assume due to the DummyChild that gets added.

For the 1st issue, I added a INPC property IsLoading to the base item VM TreeViewItemViewModel. Then I've been round and round in circles trying to get this working...at the moment I've got...

In my UnitTreeItemViewModel in the LoadChildren override I set IsLoading before and after.
C#
IsLoading = true;
//sim a delay
Thread.Sleep(TimeSpan.FromSeconds(0.75).Milliseconds);

UI.UIDispatcher.Invoke((ThreadStart)delegate()
    {
        foreach (Unit u in UnitCache.Units.AllUnits.Where(WhereClause))
        base.Children.Add(new UnitTreeItemViewModel(u, this, _uh));
    });

IsLoading = false;


Finally I added a simple TextBlock that I make visible based on IsLoading:
C#
<TextBlock Text="..."
           x:Name="loadingText"
           Visibility="{Binding Path=IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}"/>


But all this does is show on the child items (after they appear), not the parentFrown | :(
I've tried changing it to set the Parent's IsLoading, but that didn't seem to work either, the root items don't have Parents for a start...

And now I'm stuck...

I've created a Pastie of the full code here.
SuggestionRe: TreeView Children Loading Indicator Pin
Richard MacCutchan20-Nov-14 1:20
mveRichard MacCutchan20-Nov-14 1:20 
QuestionHow to navigate from one wpf window to another after certain time interval? Pin
Member 1109866018-Nov-14 23:29
Member 1109866018-Nov-14 23:29 
AnswerRe: How to navigate from one wpf window to another after certain time interval? Pin
Pete O'Hanlon18-Nov-14 23:55
mvePete O'Hanlon18-Nov-14 23:55 
GeneralRe: How to navigate from one wpf window to another after certain time interval? Pin
Member 1109866019-Nov-14 22:39
Member 1109866019-Nov-14 22:39 
GeneralRe: How to navigate from one wpf window to another after certain time interval? Pin
Pete O'Hanlon19-Nov-14 22:56
mvePete O'Hanlon19-Nov-14 22:56 
QuestionBinding to xml element that is indexed from another xml document Pin
Member 97580137-Nov-14 12:26
Member 97580137-Nov-14 12:26 
AnswerRe: Binding to xml element that is indexed from another xml document Pin
Mycroft Holmes7-Nov-14 12:58
professionalMycroft Holmes7-Nov-14 12:58 
QuestionHow to create Add in Project in Silvelight MVVM Pin
Victor Athoti7-Nov-14 3:16
Victor Athoti7-Nov-14 3:16 
AnswerRe: How to create Add in Project in Silvelight MVVM Pin
Mycroft Holmes7-Nov-14 13:04
professionalMycroft Holmes7-Nov-14 13:04 
GeneralRe: How to create Add in Project in Silvelight MVVM Pin
Richard MacCutchan7-Nov-14 22:04
mveRichard MacCutchan7-Nov-14 22:04 
GeneralRe: How to create Add in Project in Silvelight MVVM Pin
Mycroft Holmes7-Nov-14 22:42
professionalMycroft Holmes7-Nov-14 22:42 
GeneralRe: How to create Add in Project in Silvelight MVVM Pin
Victor Athoti8-Nov-14 19:02
Victor Athoti8-Nov-14 19:02 
GeneralRe: How to create Add in Project in Silvelight MVVM Pin
Richard MacCutchan8-Nov-14 21:29
mveRichard MacCutchan8-Nov-14 21:29 
AnswerRe: How to create Add in Project in Silvelight MVVM Pin
Pete O'Hanlon11-Nov-14 11:56
mvePete O'Hanlon11-Nov-14 11:56 
QuestionWPF , XAML und C# - Connection two table in a datagrid (foreign key) Pin
Member 111592295-Nov-14 22:29
Member 111592295-Nov-14 22:29 
AnswerRe: WPF , XAML und C# - Connection two table in a datagrid (foreign key) Pin
Mycroft Holmes6-Nov-14 11:39
professionalMycroft Holmes6-Nov-14 11:39 
QuestionWhich approach should use for Voice Instruction for user in WPF Pin
Ashfaque Hussain5-Nov-14 19:43
Ashfaque Hussain5-Nov-14 19:43 

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.