---
title: "Frame control in WPF"  
description: "In WPF we can use Frame control to display content of another window with the same window. WPF frame control does not support to displaying html conte"  
author: "Anonymous User"  
published: 2011-04-09  
updated: 2020-04-12  
canonical: https://www.mindstick.com/articles/543/frame-control-in-wpf  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# Frame control in WPF

### Frame control in WPF

In WPF we can use Frame control to display the content of another window with the same window. \
WPF frame control does not support displaying HTML content. \
We can navigate to another form and show the content of that form within the same window. \
The frame control in WPF supports navigation within the content. \
A-frame can be hosted within a window, navigation window or user control, etc. \
In XAML <Frame /> element is used to create a frame control. \
In this demonstration, I will show you how to use frame control in WPF.\

##### Following XAML code snippet represent frame control in WPF

```
<Frame x:Name="frame1" Width="200" Height="200" Background="LightPink" Canvas.Left="97" Canvas.Top="28">            <Frame.BitmapEffect>                <DropShadowBitmapEffect />            </Frame.BitmapEffect>            </Frame>
```

##### Output of the following code snippet is as follows

![Frame control in WPF](https://www.mindstick.com/mindstickarticle/f3ab29d9-8e26-4b01-a0b8-5b41521f9bfc/images/0e6f1ed9-4049-4580-ad25-ff0038ee7d15.png)

##### Rotating Frame by an angle

We can rotate frame providing an angle to frame object.

##### The following XAML code snippet represents are used to rotate a frame

```
<Frame x:Name="frame1" Width="200" Height="200" Background="LightPink" Canvas.Left="97" Canvas.Top="28">            <Frame.BitmapEffect>                <DropShadowBitmapEffect />            </Frame.BitmapEffect>            <Frame.LayoutTransform>                <RotateTransform Angle="40" />            </Frame.LayoutTransform></Frame>
```

##### The output of the following code snippet is as follows

![Frame control in WPF](https://www.mindstick.com/mindstickarticle/f3ab29d9-8e26-4b01-a0b8-5b41521f9bfc/images/86c25e08-6ab3-4f7a-a986-14cb5feeaa7a.png)

##### Navigating content in the Frame control

XAML code which to create User Interface of the navigation frame

```
<Canvas>        <Frame x:Name="frame1" Width="479" Height="250" Background="LightPink" Canvas.Left="12" Canvas.Top="12">            <Frame.BitmapEffect>                <DropShadowBitmapEffect />            </Frame.BitmapEffect>        </Frame>        <Button Canvas.Left="116" Canvas.Top="276" Content="Show Content" Height="23" x:Name="btnContent" Width="253" Click="btnContent_Click" /></Canvas>
```

##### The output of the following code snippet is as follows

![Frame control in WPF](https://www.mindstick.com/mindstickarticle/f3ab29d9-8e26-4b01-a0b8-5b41521f9bfc/images/fe53e44b-f0e7-441b-8776-5b9163042304.png)

##### On the click event of the Show Content button write the following code

```
private void btnContent_Click(object sender,  RoutedEventArgs e){            frame1.Navigate(new Uri("http://www.google.com"));}
```

##### The output of the following code

![Frame control in WPF](https://www.mindstick.com/mindstickarticle/f3ab29d9-8e26-4b01-a0b8-5b41521f9bfc/images/62af6144-ba6b-4be8-b821-c1bc7e54d118.png)

\

You should also read this Article - **[Group Name Field in Crystal Report](https://www.mindstick.com/Articles/613/group-name-field-in-crystal-report)**

---

Original Source: https://www.mindstick.com/articles/543/frame-control-in-wpf

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
