Click here to Skip to main content
15,851,701 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Draw Images Pin
Pete O'Hanlon5-Apr-23 3:27
subeditorPete O'Hanlon5-Apr-23 3:27 
GeneralRe: Draw Images Pin
Kevin Marois7-Apr-23 7:31
professionalKevin Marois7-Apr-23 7:31 
GeneralRe: Draw Images Pin
Pete O'Hanlon13-Apr-23 22:41
subeditorPete O'Hanlon13-Apr-23 22:41 
QuestionJson Based Themes Pin
Kevin Marois6-Mar-23 7:39
professionalKevin Marois6-Mar-23 7:39 
QuestionDropDown TreeView Pin
Kevin Marois22-Feb-23 19:34
professionalKevin Marois22-Feb-23 19:34 
AnswerRe: DropDown TreeView Pin
Gerry Schmitz24-Feb-23 10:08
mveGerry Schmitz24-Feb-23 10:08 
GeneralRe: DropDown TreeView Pin
Kevin Marois2-Mar-23 12:30
professionalKevin Marois2-Mar-23 12:30 
GeneralRe: DropDown TreeView Pin
Gerry Schmitz3-Mar-23 6:25
mveGerry Schmitz3-Mar-23 6:25 
I've implemented "tree views" using a user control "around" a ListView. All my user control revolve around something; nothing ever so special that it required a "custom control" (which is more complicated).

For a tree view - list view, each item is a usercontrol that can "indent" or "hide" itself (when expanding or collapsing). The item's user control has it's own data template; and that's how you can have every every item (level) look different by selectively exposing different parts of the same UC type.

All that's required of the item "data container" is a level number and an "expanded / collapsed" indicator; the level number is used to compute the indent (a Margin or some other "empty" object with length). The items are of course loaded in the proper sequence (hierarchy / BOM). A selection change handler can identify what level and "node" is being accessed. An expand / collapsed method keys off the current selected item and just travels the sequence below that depth.

I also added parent and child pointers (based on my needs). And added drag and drop from the (listview) tree view. On the surface, you can't tell it's a listview. Once you build one, only the item data template changes for the next "tree view".

The "drop down" could be the tree view inside a ScrollViewer, inside an Expander. Or a popup. What ever works best.


"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

QuestionStyles aren't apply on Window element in Design Mode when they are coming from a Resource Dictionary included into a .dll reference Pin
Simos Sigma22-Feb-23 2:50
Simos Sigma22-Feb-23 2:50 
Rant[REPOST] Styles aren't apply on Window element in Design Mode when they are coming from a Resource Dictionary included into a .dll reference Pin
Richard Deeming22-Feb-23 4:51
mveRichard Deeming22-Feb-23 4:51 
GeneralRe: [REPOST] Styles aren't apply on Window element in Design Mode when they are coming from a Resource Dictionary included into a .dll reference Pin
Simos Sigma22-Feb-23 23:16
Simos Sigma22-Feb-23 23:16 
GeneralRe: [REPOST] Styles aren't apply on Window element in Design Mode when they are coming from a Resource Dictionary included into a .dll reference Pin
Simos Sigma23-Feb-23 0:46
Simos Sigma23-Feb-23 0:46 
GeneralRe: [REPOST] Styles aren't apply on Window element in Design Mode when they are coming from a Resource Dictionary included into a .dll reference Pin
Simos Sigma23-Feb-23 1:55
Simos Sigma23-Feb-23 1:55 
QuestionWPF .Net Core 6 RelayCommand Problem Pin
Kevin Marois3-Feb-23 13:33
professionalKevin Marois3-Feb-23 13:33 
AnswerRe: WPF .Net Core 6 RelayCommand Problem Pin
Richard Deeming6-Feb-23 0:18
mveRichard Deeming6-Feb-23 0:18 
Questionhow to set the icon for output result(.exe) in vs2022 ? Pin
Member 136170031-Feb-23 15:56
Member 136170031-Feb-23 15:56 
AnswerRe: how to set the icon for output result(.exe) in vs2022 ? Pin
Richard MacCutchan1-Feb-23 22:12
mveRichard MacCutchan1-Feb-23 22:12 
GeneralRe: how to set the icon for output result(.exe) in vs2022 ? Pin
Member 136170032-Feb-23 14:43
Member 136170032-Feb-23 14:43 
QuestionExpander Width Problem Pin
Kevin Marois13-Jan-23 14:01
professionalKevin Marois13-Jan-23 14:01 
AnswerRe: Expander Width Problem Pin
Gerry Schmitz14-Jan-23 6:43
mveGerry Schmitz14-Jan-23 6:43 
QuestionTabItem Render Pin
Kevin Marois9-Jan-23 19:59
professionalKevin Marois9-Jan-23 19:59 
AnswerRe: TabItem Render Pin
Pete O'Hanlon9-Jan-23 20:38
subeditorPete O'Hanlon9-Jan-23 20:38 
GeneralRe: TabItem Render Pin
Kevin Marois9-Jan-23 21:07
professionalKevin Marois9-Jan-23 21:07 
GeneralRe: TabItem Render Pin
Pete O'Hanlon9-Jan-23 21:38
subeditorPete O'Hanlon9-Jan-23 21:38 
GeneralRe: TabItem Render Pin
Gerry Schmitz10-Jan-23 7:45
mveGerry Schmitz10-Jan-23 7:45 

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.