2012-11-07 3 views
1

많은 수의 페이지가 포함 된 WPF 응용 프로그램을 작성하고 있습니다. Asp.Net에서 IsPostBack과 비슷한 기능이 있는지 여부를 알고 싶습니다. 나는 단지 이것이 특정 페이지가 로딩되고있는 것을 처음 알았 으면한다. 미리 감사드립니다. 페이지 탐색이 Frame를 통해 일어나는 경우WPF 페이지의 Ispost와 비슷한 기능

XAML

<Window x:Class="Custom_Track_Reports.LoginWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="LoginWindow" > 
<Viewbox Stretch="Fill"> 
<Grid Background="#FF58B0DF" Height="401"> 
     <Rectangle Fill="#FFF0F3F4" Height="173" Margin="45,197,58,0" Stroke="Black" VerticalAlignment="Top" AllowDrop="True" /> 
     <Image Height="125" Margin="340,10,330,0" VerticalAlignment="Top" Source="Images/logo_lrg.png"/> 
     <Label Content="Custom Track Reports" HorizontalAlignment="Left" Margin="287,147,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.607,1.112" Width="268" Height="47" FontFamily="Arial" FontSize="26" Foreground="White"/> 
     <TextBox Margin="128,0,0,110" TextWrapping="Wrap" VerticalAlignment="Bottom" Height="25" BorderThickness="1" FontFamily="Arial" FontSize="21" Text="" Name="userTextBox" FontStretch="Expanded" Opacity="1" HorizontalAlignment="Left" Width="546" AcceptsReturn="False" KeyDown="userTextBox_KeyDown" /> 
     <Button x:Name="enterButton" Content="Enter" HorizontalAlignment="Right" Margin="0,311,166,0" VerticalAlignment="Top" Width="110" Height="26" FontSize="14" Style="{DynamicResource button}" Click="enterButton_Click"/> 
     <Label Content="User ID" FontSize="20" FontWeight="Bold" Height="40" HorizontalAlignment="Left" Margin="122,215,0,0" Name="label1" VerticalAlignment="Top" Width="105" /> 
    </Grid> 
</Viewbox> 

+1

Windows 양식에 대한 다시 게시가 없습니다 ... 실제로 웹에 대한 다시 게시도 없습니다. 그러나 Microsoft는 Windows Forms devs asp.net을 끌어 들이고 싶었습니다. 그래서 그들은 developmenet 경험과 같은 창 형태를 제공하려고했습니다. Button.Click 이벤트 IsPostBack은이 추상화의 부작용입니다. – adt

답변

0

, 다음 Frame.Navigated 이벤트에 연결합니다. 자세한 내용 (일부 XAML 및 코드)을 제공하면보다 도움이 될 수 있습니다.

관련 문제