Overview

BeepSocialWidget is a paint-based WinForms widget that inherits from BaseControl. It uses an IWidgetPainter pipeline to render rich visuals without child controls. The Style property selects one of 10 built-in render modes; changing it at runtime immediately swaps the painter and triggers a repaint.

Toolbox icon: 👥
Category: Beep Widgets → Social
Default size: 300 × 200
Namespace: TheTechIdea.Beep.Winform.Controls.Widgets

Key Features

👥 Ten Social Styles

Profile to chat thread — complete social UI toolkit in one widget.

💬 Chat Bubbles

ChatWidget renders sent/received message bubbles with timestamps.

📊 UserStats

Stats card shows followers, following, posts with numerical badges.

🟢 Online Indicators

UserList style renders live online status dots per user.

🖱️ Action Buttons

ProfileCard and ContactCard styles include Follow/Message action buttons.

🌊 Activity Stream

ActivityStream renders a chronological feed with type icons.

Style Variants (10)

Style ValueDescription
ProfileCardUser profile with avatar, name, role, and social stats.
TeamMembersGrid of team member avatar thumbnails with name chips.
MessageCardSingle message bubble with sender avatar and timestamp.
ActivityStreamChronological social activity feed.
UserListScrollable contact/user list with online indicators.
ChatWidgetChat interface with sent/received message bubbles.
CommentThreadThreaded comment display with reply indentation.
SocialFeedSocial media style post card with like/share counts.
UserStatsUser statistics card (posts, followers, following, etc.).
ContactCardContact information card with action buttons.

Properties

PropertyTypeDefaultDescription
StyleSocialWidgetStyleProfileCardSelects the social painter.
Titlestring"Social Widget"Primary heading or user name.
Subtitlestring"Subtitle"Secondary heading or role.
UserNamestring"John Doe"Display name for profile/contact styles.
UserRolestring"Developer"Role or position label.
AvatarPathstring""Path to avatar image.
SocialItemsList<SocialItem>(empty)Data collection for feed, chat, and user list styles.
AccentColorColor(theme primary)Accent for action buttons and online indicators.

Inherits all BaseControl properties (Border, Padding, Theme colors, etc.).

Events

EventArgs TypeDescription
ProfileClickedBeepEventDataArgsFired when the profile/avatar area is clicked.
ActionClickedBeepEventDataArgsFired when a social action button (Follow, Message, etc.) is clicked.
ItemClickedBeepEventDataArgsFired when a feed post, chat message, or list item is clicked.

Basic Usage

var profile = new BeepSocialWidget
{
    Style      = SocialWidgetStyle.ProfileCard,
    UserName   = "Alex Johnson",
    UserRole   = "Senior Engineer",
    AvatarPath = "avatars/alex.png",
    Size       = new Size(260, 200)
};

var chat = new BeepSocialWidget
{
    Style       = SocialWidgetStyle.ChatWidget,
    Title       = "Support Chat",
    SocialItems = new List
    {
        new SocialItem { Text = "Hello, how can I help?",  IsSent = false, Sender = "Support" },
        new SocialItem { Text = "I need help with login.", IsSent = true,  Sender = "You"     },
    },
    Size = new Size(340, 260)
};

Event Handling

profile.ActionClicked  += (s, e) => SendFollowRequest(profile.UserName);
profile.ProfileClicked += (s, e) => OpenUserProfile(profile.UserName);

Best Practices

  • Set Style before adding the widget to the form to avoid double repaints.
  • Adjust Size to fit your layout — defaults are minimum comfortable sizes.
  • Read BeepEventDataArgs.Data in event handlers for context-specific click data.
  • Call Invalidate() after updating data properties to trigger a repaint.
  • Let theme colors flow from BeepStyling.CurrentTheme — avoid overriding color properties unless customization is explicitly desired.