Code Examples
Explore interactive examples demonstrating various features and integrations.
Auth0 with Blazor Server
Order: 2Integration Auth0 with Blazor Server is straightforward. This example demonstrates the necessary steps to set up authentication and authorization using Auth0 in a Blazor Server application. Follow the steps below to get started.
Azure AI Chat Bot
Order: 3Chat with Jaws - ask about the weather anywhere, or for a joke.
AI Fortune Cookie
Order: 4Crack open an AI-written fortune with lucky numbers, then browse your fortune history.
Code Editor Demo
Order: 10The Monaco editor is an open source text editor created by Microsoft and used in VSCode. Monaco provides support for multiple programming languages including C#, JavaScript, and SQL.
Code Highlighting Example
Order: 10Demonstrates syntax highlighting for C#, SQL, Blazor, and PowerShell using the HTML <code> tag and Prism.js.
Real-Time Mouse Tracking
Order: 10Real-time collaborative mouse tracking using SignalR. See other users' mouse cursors as they move around the page.
Interactive Maps
Order: 12Leaflet + OpenStreetMap maps with markers, clustering, layer toggles, and click-to-place pin picking - no API key, no billing.
Real-time Synchronization
Order: 20Demonstrates SignalR-based real-time state synchronization with automatic master election, live counters, and synchronized interactions across multiple browser sessions.
Agent Framework
Agent Framework: Basic Setup
Order: 5The smallest possible Microsoft Agent Framework setup: one shared AIAgent, one RunAsync call.
Agent Framework: Azure AI Foundry Integration
Order: 6How this site's AIAgent is actually backed by an Azure AI Foundry project, and what that buys you.
Agent Framework: Conversational Chat
Order: 7The minimum code needed for multi-turn, streaming chat with the Agent Framework - no model picker, no chrome.
Agent Framework: MCP Servers
Order: 8The general shape of MCP servers and clients in the Agent Framework - hosting tools and calling them.
Quick Navigation
Auth0 with Blazor Server
/examples/auth0-blazor-server-integrationAzure AI Chat Bot
/examples/azure-openai-chat-botAI Fortune Cookie
/examples/ai-fortune-cookieAgent Framework: Basic Setup
/examples/agent-framework-basicsAgent Framework: Azure AI Foundry Integration
/examples/agent-framework-foundryAgent Framework: Conversational Chat
/examples/agent-framework-chatAgent Framework: MCP Servers
/examples/agent-framework-mcpCode Editor Demo
/examples/code-editorCode Highlighting Example
/examples/code-highlightingReal-Time Mouse Tracking
/examples/mouse-trackingInteractive Maps
/examples/mapReal-time Synchronization
/examples/realtime-sync