wpf - Page can have only Window or Frame as parent -
i want switch between wpf pages, getting above mentioned error:page can have window or frame parent. here code
imports system.windows.forms
public class page1
private sub btn1_click(sender object, e routedeventargs) handles btn1.click try dim dd new page2 me.content = dd me.txt1.text = (dd.txt10.text) catch ex exception txt1.text = ex.message end try
xaml file code
<page x:class="page2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:ignorable="d" d:designheight="300" d:designwidth="300" title="page2"> <grid> <button x:name="button1" content="button" horizontalalignment="left" margin="163,62,0,0" verticalalignment="top" width="101" height="55"/> <textbox x:name="txt10" horizontalalignment="left" height="23" margin="38,81,0,0" textwrapping="wrap" text="textbox" verticalalignment="top" width="120"/> </grid>
please guide me doing wrong?
based on name page1 assume page. put frame in page1 , load page2 frame.
9 years later and I have the same issue. Did you manage to solve it?
ReplyDeletePlease, if know how send me eduza@gmail.com
9 years later and I have the same issue. Did you manage to solve it?
ReplyDeletePlease, if know how send me eduza@gmail.com