© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
33 replies
Will Pittenger

✅ Abstract classes as the WPF DesignContext?

Does it matter if the value in
d:DesignContext="{d:DesignInstance Type=X}"
d:DesignContext="{d:DesignInstance Type=X}"
is an
abstract
abstract
class. I can't get the WPF design to acknowledge my type. I know some of you guys have said not to rely on it, but it does help from time to time and I at least like the design context set. I've tried deleting the bin and obj folders for that project and restarting VS. Didn't help.
<Base:AbstractVisualConversationTabCtrl
    x:Class="BestChat.IRC.Global.View.ConversationViewCtrl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:BestChat.IRC.Global.View"
    xmlns:Base="clr-namespace:BestChat.GUI.Ctrls;assembly=BestChat.GUI.Ctrls"
    xmlns:OurDataCtxt="BestChat.Platform.Conversations;Assembly=BestChat.Platform.Conversations"
    xmlns:DataDefs="clr-namespace:BestChat.IRC.Data.Defs;assembly=BestChat.IRC.Data"
    xmlns:CalcBinding="clr-namespace:CalcBinding;assembly=CalcBinding"
    xmlns:Emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
    xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=BestChat.IRC.Global.View.Ctrls"
    xmlns:GuiCtrls="clr-namespace:BestChat.GUI.Ctrls;assembly=BestChat.GUI.Ctrls"
    d:DataContext="{x:Type d:DesignInstance Type=OurDataCtxt:AbstractConversation}"
    mc:Ignorable="d">
<Base:AbstractVisualConversationTabCtrl
    x:Class="BestChat.IRC.Global.View.ConversationViewCtrl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:BestChat.IRC.Global.View"
    xmlns:Base="clr-namespace:BestChat.GUI.Ctrls;assembly=BestChat.GUI.Ctrls"
    xmlns:OurDataCtxt="BestChat.Platform.Conversations;Assembly=BestChat.Platform.Conversations"
    xmlns:DataDefs="clr-namespace:BestChat.IRC.Data.Defs;assembly=BestChat.IRC.Data"
    xmlns:CalcBinding="clr-namespace:CalcBinding;assembly=CalcBinding"
    xmlns:Emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
    xmlns:Ctrls="clr-namespace:BestChat.IRC.Global.View.Ctrls;assembly=BestChat.IRC.Global.View.Ctrls"
    xmlns:GuiCtrls="clr-namespace:BestChat.GUI.Ctrls;assembly=BestChat.GUI.Ctrls"
    d:DataContext="{x:Type d:DesignInstance Type=OurDataCtxt:AbstractConversation}"
    mc:Ignorable="d">

Then inside BestChat.Platform.Conversations.dll, we have
BestChat.Platform.Conversations.AbstractConversation
BestChat.Platform.Conversations.AbstractConversation
. Those appear to match to me.
namespace BestChat.Platform.Conversations
{
    public abstract class AbstractConversation
.
.
.
}
namespace BestChat.Platform.Conversations
{
    public abstract class AbstractConversation
.
.
.
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

✅ Printing abstract classes
C#CC# / help
4y ago
❔ C# abstract classes & interfaces
C#CC# / help
3y ago
✅ Working with abstract classes in a homework problem
C#CC# / help
5mo ago
Any good guides/videos to learn Abstract Classes?
C#CC# / help
11mo ago