C# Corner
  • Tech
  • News
  • Videos
  • Forums
  • Trainings
  • Books
  • Events
    • Interviews
    • Jobs
    • Live
    • Learn
    • Career
    • Members
    • Blogs
    • Challenges
    • Certifications
    • Bounties
  • Article
  • Blog
  • Video
  • Ebook
  • Interview Question
  • .NET
  • .NET Aspire
  • .NET Core
  • .NET MAUI
  • .NET Standard
  • Active Directory
  • ADO.NET
  • Agile Development
  • AI
  • AI Automation & Agents
  • AJAX
  • AlbertAGPT
  • Alchemy
  • Alexa Skills
  • Algorand
  • Algorithms in C#
  • Android
  • Angular
  • Apple
  • Arbitrum
  • ArcObject
  • ASP.NET
  • ASP.NET Core
  • Augmented Reality
  • Avalanche
  • AWS
  • Azure
  • Backbonejs
  • Base Blockchain
  • Big Data
  • Bitcoin
  • BizTalk Server
  • Blazor
  • Blockchain
  • Bootstrap
  • Bot Framework
  • Business
  • Business Intelligence(BI)
  • C#
  • C# Corner
  • C# Strings
  • C, C++, MFC
  • Career Advice
  • Careers and Jobs
  • Chapters
  • ChatGPT
  • Cloud
  • Coding Best Practices
  • Cognitive Services
  • COM Interop
  • Compact Framework
  • Copilot
  • Cortana Development
  • Cosmos DB
  • Cryptocurrency
  • Cryptography
  • Crystal Reports
  • CSS
  • Current Affairs
  • Custom Controls
  • Cyber Security
  • Data Mining
  • Data Science
  • Data Structures and Algorithms (DSA)
  • Databases & DBA
  • Databricks
  • Design Patterns & Practices
  • DevExpress
  • DevOps
  • DirectX
  • Docker
  • Dynamics CRM
  • Enterprise Development
  • Entity Framework
  • Error Zone
  • Exception Handling
  • F#
  • Files, Directory, IO
  • Flutter
  • Games Programming
  • GDI+
  • General
  • Generative AI
  • Generative Engine Optimization (GEO)
  • GO
  • Google Cloud
  • Google Development
  • Graphics Design
  • Graphite Studio
  • Hardware
  • Hiring and Recruitment
  • HoloLens
  • How do I
  • HTML 5
  • Infragistics
  • Internet & Web
  • Internet of Things
  • Ionic
  • Java
  • Java and .NET
  • JavaScript
  • JQuery
  • JSON
  • JSP
  • Knockout
  • Kotlin
  • Kubernetes
  • Langchain
  • Leadership
  • Learn .NET
  • Learn iOS Programming
  • LINQ
  • LLMs
  • Machine Learning
  • Metaverse
  • Microsoft 365
  • Microsoft Fabric
  • Microsoft Office
  • Microsoft Phone
  • Microsoft Teams
  • Mobile Development
  • MongoDB
  • MuleSoft
  • MySQL
  • n8n
  • NEAR
  • NetBeans
  • Networking
  • Next.js
  • NFT
  • NoCode LowCode
  • Node.js
  • Office Development
  • OOP/OOD
  • Open Source
  • Operating Systems
  • Oracle
  • Outsourcing
  • Philosophy
  • PHP
  • Polygon
  • PostgreSQL
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pages
  • Printing in C#
  • Products
  • Progress
  • Progressive Web Apps
  • Project Management
  • Prompt Engineering
  • Public Speaking
  • Python
  • Q#
  • QlikView
  • Quantum Computing
  • R
  • React
  • React Native
  • Reports using C#
  • RevealBi
  • Robotics & Hardware
  • RPA
  • Ruby on Rails
  • RUST
  • Salesforce
  • Security
  • Servers
  • ServiceNow
  • SharePoint
  • Sharp Economy
  • SignalR
  • Smart Devices
  • Snowflake
  • Software Architecture/Engineering
  • Software Testing
  • Solana
  • Solidity
  • Sports
  • SQL
  • SQL Server
  • Startups
  • Stratis Blockchain
  • Swift
  • SyncFusion
  • Threading
  • Tools
  • TypeScript
  • Unity
  • UWP
  • Vibe Coding
  • Visual Basic .NET
  • Visual Studio
  • Vue.js
  • WCF
  • Wearables
  • Web API
  • Web Design
  • Web Development
  • Web3
  • Windows
  • Windows Controls
  • Windows Forms
  • Windows PowerShell
  • Windows Services
  • Workflow Foundation
  • WPF
  • Xamarin
  • XAML
  • XML
  • XNA
  • XSharp
  • Register
  • Login
1
Answer

How to apply themes to the user control?

Photo of wajid ansari

wajid ansari

16y
3.1k
0
1
Hi friends

I have created a user control with name menuUserControl with menu control in it. I have created a user defined property for the user control(menuUserControl) as groupid and when ever I pass groupid to the user control(menuUserControl) in a page, it should use a theme based on the groupid I pass to it. For example if I use two user controls(menuUserControl) one at the top and other at the bottom of the the page with two different groupids like if I pass groupid=1 for top user controls(menuUserControl), it should use theme1 and groupid=2 to the bottom user controls(menuUserControl), it should use theme2. So my problem is that I am unable to apply theme to the user control. I have done some google search but unable to create a theme for a user control. I am only able to apply themes to the server controls. As I am using two user controls i.e menuUserControl as said above, both are displaying same theme. I want to apply two different themes to two user controls(menuUserControl). If any one have any solution or any other alternative, kindly help me please, Its very urgent for me. If you did not understand or you have any doubt, please reply back, I will try to analyze the problem. Hope to get a positive response.

Thanks Wajid

Answers (1)

Related Discussion
Forum Statistics
  • Please welcome our newest member Naavy .

  • 3,100,026 users have contributed to 147,381 threads and 483,718

  • In the past 24 hours, we have  6 new threads, 8 new posts, and 113 new users.

  • In last week, the most popular thread is 'System.FormatException: 'Input string was not in a correct format.''.

Upcoming Events
View all
  • AI Agent Bootcamp 2025
  • AI Agents Conference - 2025
  • .NET Conf 2025 - Chennai

Our Training Programs

View all
  • AI & Machine Learning

  • Mastering Large Language Models

  • Mastering Prompt Engineering

  • Certified Vibe Coder

  • Github Copilot Training

  • Generative AI for Beginners

  • n8n Automation & AI Agents Training

Message
About Us Contact Us Privacy Policy Terms Media Kit Partners C# Tutorials Consultants Ideas Report A Bug FAQs Certifications Sitemap Stories CSharp TV DB Talks Let's React Web3 Universe Interviews.help Jumpstart Blockchain Build with JavaScript

©2025 C# Corner.

All contents are copyright of their authors.