|
<UserControl
x:Class="ReportingServicesDemo.LoginUI.LoginStatus"
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:vsm="clr-namespace:System.Windows;assembly=System.Windows"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d">
<Grid x:Name="LayoutRoot">
<vsm:VisualStateManager.VisualStateGroups>
<vsm:VisualStateGroup x:Name="loginStates">
<vsm:VisualState x:Name="windowsAuth">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="loginControls" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="logoutButton" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
<vsm:VisualState x:Name="loggedIn">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="loginControls" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
<vsm:VisualState x:Name="loggedOut">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="logoutControls" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
</vsm:VisualStateGroup>
</vsm:VisualStateManager.VisualStateGroups>
<StackPanel x:Name="loginControls" Style="{StaticResource LoginPanelStyle}">
<Button x:Name="loginButton" Content="{Binding Path=ApplicationStrings.LoginButton, Source={StaticResource ResourceWrapper}}"
Click="LoginButton_Click" Style="{StaticResource LoginRegisterLinkStyle}"/>
</StackPanel>
<StackPanel x:Name="logoutControls" Style="{StaticResource LoginPanelStyle}">
<!-- welcomeText.Text property's binding is setup in code-behind -->
<TextBlock x:Name="welcomeText" Style="{StaticResource WelcomeTextStyle}"/>
<TextBlock Text=" | " Style="{StaticResource SpacerStyle}"/>
<Button x:Name="logoutButton" Content="{Binding Path=ApplicationStrings.LogOffButton, Source={StaticResource ResourceWrapper}}"
Click="LogoutButton_Click"
Style="{StaticResource LoginRegisterLinkStyle}"
IsEnabled="{Binding Path=Authentication.IsLoggingOut, Converter={StaticResource NotOperatorValueConverter}}" />
</StackPanel>
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Ernesto Herrera is a Senior Developer, Architect with more than 12 years experience, actually working with Silverlight Line-of-Bussiness Applications, he holds a MCTS Web Application 2.0 Certification, and have a wide experience with sql server since the 6.5 version, on his free time he likes to play tennis with his wife,kids and friends, also enjoy playing Wii with his sons, he works at Sigo S.A., a retail business located at Margarita Island, Venezuela.