uwp-demos/Navigation/HubTiles/PulsingTileView.xaml

94 строки
5.3 KiB
XML

<View:SampleLayout
x:Class="Notification.HubTile.PulsingTileView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Notification.HubTile" xmlns:View="using:Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" xmlns:syncfusion="using:Syncfusion.UI.Xaml.Controls.Notification" xmlns:Input="using:Syncfusion.UI.Xaml.Controls.Input"
d:DesignHeight="300"
d:DesignWidth="400">
<UserControl.Resources>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Common/StandardStyles.xaml" />
</ResourceDictionary.MergedDictionaries>-->
<SolidColorBrush x:Key="AccentBrush" Color="#FF1196CD"/>
</ResourceDictionary>
</UserControl.Resources>
<View:SampleLayout.Sample>
<ContentControl HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<syncfusion:SfPulsingTile Width="200" Height="200"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Padding="0"
Margin="25 25" x:Name="hubtile"
Header="{Binding ElementName=header, Path=Text}"
Foreground="White" Background="{StaticResource AccentBrush}"
RadiusX="{Binding ElementName=radiusx,Path=Value}"
RadiusY="{Binding ElementName=radiusy,Path=Value}"
PulseScale="{Binding ElementName=pulsescale,Path=Value}">
<Image Source="Assets/PulsingTile.jpg" Stretch="UniformToFill" VerticalAlignment="Center"
HorizontalAlignment="Center" Height="200" />
</syncfusion:SfPulsingTile>
</Grid>
</ContentControl>
</View:SampleLayout.Sample>
<View:SampleLayout.Setting>
<ContentControl>
<Grid Width="300" Margin="10 0 10 10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Header" Margin="10 5" Grid.Row="0"/>
<Input:SfTextBoxExt Margin="10 5" Grid.Row="1" Text="Hub Tile" x:Name="header"/>
<TextBlock Text="RadiusX" Margin="10 5" Grid.Row="2"/>
<Input:SfNumericUpDown Margin="10 5" Grid.Row="3" BlockCharactersOnTextInput="True"
Maximum="5" Minimum="0"
MaximumNumberDecimalDigits="0"
AccentBrush="{StaticResource AccentBrush}"
x:Name="radiusx" Value="0"
/>
<TextBlock Text="RadiusY" Margin="10 5" Grid.Row="4"/>
<Input:SfNumericUpDown Margin="10 5" Grid.Row="5" BlockCharactersOnTextInput="True"
Maximum="5" Minimum="0"
MaximumNumberDecimalDigits="0"
AccentBrush="{StaticResource AccentBrush}"
x:Name="radiusy" Value="0"
/>
<TextBlock Text="Pulse Duration" Margin="10 5" Grid.Row="6"/>
<Input:SfNumericUpDown Margin="10 5" Grid.Row="7" BlockCharactersOnTextInput="True"
Maximum="8" Minimum="1"
MaximumNumberDecimalDigits="3"
AccentBrush="{StaticResource AccentBrush}"
x:Name="pulseduration" Value="6" ValueChanged="pulseduration_Changed"
/>
<TextBlock Text="Pulse Scale" Margin="10 5" Grid.Row="8"/>
<Input:SfNumericUpDown Margin="10 5" Grid.Row="9" BlockCharactersOnTextInput="True"
Maximum="3" Minimum="1"
MaximumNumberDecimalDigits="3"
AccentBrush="{StaticResource AccentBrush}"
x:Name="pulsescale" Value="2"
/>
</Grid>
</ContentControl>
</View:SampleLayout.Setting>
</View:SampleLayout>