-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathAdapterErrorView.xaml
More file actions
38 lines (37 loc) · 2.11 KB
/
Copy pathAdapterErrorView.xaml
File metadata and controls
38 lines (37 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<UserControl x:Class="SyncPro.UI.Controls.AdapterErrorView"
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"
xmlns:adapters="clr-namespace:SyncPro.UI.ViewModels.Adapters"
xmlns:microsoftOneDrive="clr-namespace:SyncPro.Adapters.MicrosoftOneDrive;assembly=SyncPro.Adapters.MicrosoftOneDrive"
xmlns:controls="clr-namespace:SyncPro.UI.Controls"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance adapters:SyncAdapterViewModel}">
<Grid>
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Collapsed" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=AdapterBase.IsFaulted}" Value="True" >
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<ContentControl Content="{Binding Path=AdapterBase.FaultInformation}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type microsoftOneDrive:OneDriveRefreshTokenExpiredFault}">
<StackPanel>
<TextBlock>
<Run Foreground="#E23116" Text="The Windows Live token has expired. You will need to sign in before files can be synchronized." />
<Hyperlink Command="{Binding RelativeSource={RelativeSource AncestorType=controls:AdapterErrorView}, Path=DataContext.(adapters:OneDriveAdapterViewModel.SignInCommand)}">
<Run Text="Click here to sign in again." />
</Hyperlink>
</TextBlock>
</StackPanel>
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
</Grid>
</UserControl>