Will Pittenger
Will Pittenger
CC#
Created by Will Pittenger on 11/9/2023 in #help
❔ Can't get root XAML element of UserControl for binding
😦
6 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
❔ Can't get root XAML element of UserControl for binding
Haven't had time to get back to this.
6 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
???
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
I have been wondering if XML would be a better choice for my sample data.
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
Started programming as a 15-year-old in 1983 on my Dad's Apple ][+ with AppleSoft.
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
😁
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
Mostly, I probably just needed to talk about the problem. /maybe someone in a similar situation will do the same thing.
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
The problem might actually have the lack of parameterless constructors. I didn't design the system to be compatible with JSON. This is only for a demo version of the app.
14 replies
CC#
Created by Will Pittenger on 11/9/2023 in #help
✅ How to deserialize JSON in .NET when my base class is generic?
I've been reconfiguring the code to evaluate the JsonElements myself. The simple deserialization couldn't handle the complex nature of what I was loading. The more I looked at it, I needed more data types. (ClientEventInfo isn't that complex.) So some of the other event info classes will be only abstract so derived types can add more fields. I'll start with a Type enum to decide which abstract base class is involved. Each of those declares a series of subtypes as more enums. Eventually, I'll know the correct type.
14 replies
CC#
Created by Will Pittenger on 11/8/2023 in #help
❔ ✅ WPF Class derivation where both classes have XAML pages
It would've been so helpful.
5 replies
CC#
Created by Will Pittenger on 11/8/2023 in #help
❔ ✅ WPF Class derivation where both classes have XAML pages
Well, it didn't work. I ran into an error specifically for this situation. https://learn.microsoft.com/en-us/troubleshoot/developer/dotnet/framework/general/error-mc6017-define-class-xaml
5 replies
CC#
Created by Will Pittenger on 11/8/2023 in #help
✅ How do you control which WPF property is the default for that class?
Thanks.
3 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
The branch of the control's derived classes I was working on will generate a list of contents for the ScrollViewer as was always the plan.
9 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
As is, I put a Ctnts property into the abstract class and mapped it to the ScrollViewer's Content property. I may simply change that so there's a panel that's hidden unless it receives content. What I called Ctnts would be renamed Hdr and mapped to the new panel's Content property.
9 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
I finally figured out what was going on. A couple months ago,, I wrote a base class (that I derived from a couple times) that created the ScrollViewer. I found it by searching for "ScrollViewer" in my files. Until a few hours ago, I was thinking it would appear only in a XAML file. But this was in a class that didn't have a XAML as it was abstract and I was going to have the derived class provide the XAML. But for some strange reason I don't remember, I put the ScrollViewer in the CS file's OnInitialized which promptly erased the contents from the XAML. In some situations, I'll want all views to have a ScrollViewer as the content of the window with its content provided provided by an implementation. But in this situation, the derived class will be providing what you could think of as the "non-client" area never mind this isn't a Window. Basically, some versions will be adding a bar along the top. At least I know what was going on. I'm considering moving things around a bit.
9 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
Well, I'm giving up for now and calling it a night.
9 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
Looks like my DockPanel was created, but not added to the tree. I checked the VisualParent property. It was null.
9 replies
CC#
Created by Will Pittenger on 11/5/2023 in #help
✅ WPF Custom control should have contents as DockPanel, but it shows up at runtime as ScrollViewer
Well, the code runs just fine. Took two ItemsControl instances each needing a Template Selector. However, I still have the Live Property Explorer reporting the contents of my user control is a ScrollViewer rather than a DockPanel. The problem is I'm trying to figure out why the controls I was adding on the fly (now done with the ItemsControl weren't showing up.
9 replies
CC#
Created by Will Pittenger on 11/6/2023 in #help
✅ Abstract classes as the WPF DesignContext?
Well, I took the DesignInstance stuff out for now. I'm back to trying to resolve https://discord.com/channels/143867839282020352/1170760309410107473.
34 replies
CC#
Created by Will Pittenger on 11/6/2023 in #help
✅ Abstract classes as the WPF DesignContext?
.NET 7.0 in VS 2022?
34 replies