Windows Presentation Foundation C#

Displaying a Webpage in a Frame

This C# program demonstrates how to display a webpage within a frame in a WPF program. Setting the "Source" to "https://xoax.net" displays the "XoaX.net" website.

MainWindow.xaml

<Window x:Class="Frame1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Frame Content="Frame" HorizontalAlignment="Left" Height="310" VerticalAlignment="Top" Width="507" Source="https://xoax.net"/>
    </Grid>
</Window>
 

MainWindow.xaml.cs

using System.Windows;

namespace Frame1 {
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
        }
    }
}
 

Window with Frame a Containing XoaX.net

Window with a Frame Containing XoaX.net
 
 

© 2007–2025 XoaX.net LLC. All rights reserved.