integrating-wpf-media

Solid

Integrates multimedia content in WPF including MediaElement video/audio playback, Image control display, and SoundPlayerAction effects. Use when building media players, galleries, or multimedia UIs.

Code & Development 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# WPF Media Integration Patterns Integrating multimedia content such as images, video, and audio in WPF. ## 1. Image Control ### 1.1 Basic Image Display ```xml <!-- Resource image --> <Image Source="/Assets/logo.png" Width="100" Height="100"/> <!-- Absolute path --> <Image Source="C:\Images\photo.jpg"/> <!-- URI --> <Image Source="https://example.com/image.png"/> <!-- Pack URI (embedded resource) --> <Image Source="pack://application:,,,/MyAssembly;component/Images/icon.png"/> ``` ### 1.2 Stretch Options ```xml <!-- None: maintain original size --> <Image Source="/photo.jpg" Stretch="None"/> <!-- Fill: stretch to fit area (ignore aspect ratio) --> <Image Source="/photo.jpg" Stretch="Fill"/> <!-- Uniform: maintain aspect ratio, maximum size within area --> <Image Source="/photo.jpg" Stretch="Uniform"/> <!-- UniformToFill: maintain aspect ratio, fill area (may crop) --> <Image Source="/photo.jpg" Stretch="UniformToFill"/> ``` ### 1.3 Dynamic Image Loading ```csharp namespace MyApp.Helpers; using System; using System.IO; using System.Windows.Media; using System.Windows.Media.Imaging; public static class ImageHelper { /// <summary> /// Load image from file /// </summary> public static BitmapImage LoadFromFile(string filePath) { var bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.UriSource = new Uri(filePath, UriKind.Absolute); bitmap.CacheOption = BitmapCacheOption.OnLoad; bitmap.EndInit(); ...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category