-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
250 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<UserControl x:Class="SophiApp.Controls.DropDownListBox" | ||
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:local="clr-namespace:SophiApp.Controls" | ||
mc:Ignorable="d"> | ||
|
||
<UserControl.Resources> | ||
<Style TargetType="{x:Type StackPanel}" x:Key="Style.Grid.ViewBox.Wrapper"> | ||
<Setter Property="Background" Value="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="Width" Value="32" /> | ||
<Setter Property="Height" Value="32" /> | ||
<Setter Property="Panel.ZIndex" Value="30" /> | ||
<Setter Property="VerticalAlignment" Value="Center" /> | ||
<Setter Property="HorizontalAlignment" Value="Right" /> | ||
<Setter Property="Margin" Value="0" /> | ||
</Style> | ||
<Style TargetType="{x:Type TextBlock}"> | ||
<Setter Property="VerticalAlignment" Value="Center" /> | ||
<Setter Property="HorizontalAlignment" Value="Center" /> | ||
<Setter Property="FontSize" Value="{Binding Path=FontSize, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="TextWrapping" Value="NoWrap" /> | ||
</Style> | ||
<Style TargetType="{x:Type ComboBox}"> | ||
<Setter Property="Panel.ZIndex" Value="10" /> | ||
<Setter Property="Width" Value="{Binding Path=Width, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="Height" Value="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
</Style> | ||
<Style TargetType="{x:Type StackPanel}"> | ||
<Setter Property="Orientation" Value="Horizontal" /> | ||
<Setter Property="Background" Value="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="Width" Value="{Binding Path=Width, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="Height" Value="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
<Setter Property="VerticalAlignment" Value="Top" /> | ||
<Setter Property="HorizontalAlignment" Value="Stretch" /> | ||
<!--<Setter Property="Panel.ZIndex" Value="20" />--> | ||
</Style> | ||
<Style TargetType="{x:Type Viewbox}"> | ||
<Setter Property="Width" Value="12" /> | ||
<Setter Property="Height" Value="12" /> | ||
</Style> | ||
<Style TargetType="{x:Type Canvas}"> | ||
<Setter Property="Width" Value="12" /> | ||
<Setter Property="Height" Value="12" /> | ||
</Style> | ||
<Style TargetType="{x:Type Path}"> | ||
<Setter Property="Fill" Value="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
</Style> | ||
<Style TargetType="{x:Type local:DropDownListBox}"> | ||
<Setter Property="SnapsToDevicePixels" Value="True" /> | ||
<Setter Property="IsTabStop" Value="False" /> | ||
<Setter Property="Focusable" Value="False" /> | ||
<Setter Property="TextOptions.TextFormattingMode" Value="Display" /> | ||
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" /> | ||
<Setter Property="Background" Value="{DynamicResource Brush.Window.Background}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource Brush.Window.Foreground}" /> | ||
<Setter Property="HorizontalAlignment" Value="Left" /> | ||
<!--<Setter Property="Height" Value="32" /> | ||
<Setter Property="Width" Value="156" />--> | ||
<Setter Property="FontSize" Value="14" /> | ||
</Style> | ||
</UserControl.Resources> | ||
<UserControl.Template> | ||
<ControlTemplate> | ||
</ControlTemplate> | ||
</UserControl.Template> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace SophiApp.Controls | ||
{ | ||
/// <summary> | ||
/// Логика взаимодействия для DropDownListBox.xaml | ||
/// </summary> | ||
public partial class DropDownListBox : UserControl | ||
{ | ||
public DropDownListBox() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<UserControl x:Class="SophiApp.Views.ViewSettings" | ||
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:converters="clr-namespace:SophiApp.Converters" | ||
xmlns:controls="clr-namespace:SophiApp.Controls" | ||
xmlns:local="clr-namespace:SophiApp.Views" | ||
mc:Ignorable="d"> | ||
|
||
<UserControl.Resources> | ||
<converters:BoolToInverseBool x:Key="BoolToInverseBoolConverter" /> | ||
<converters:TagToVisibility x:Key="TagToVisibilityConverter" /> | ||
<Thickness x:Key="Animation.Page.Margin">0, 10, 0, 0</Thickness> | ||
<Storyboard x:Key="Animation.Page.Visible"> | ||
<ThicknessAnimation Storyboard.TargetProperty="Margin" | ||
From="{StaticResource Animation.Page.Margin}" | ||
To="0, 0, 0, 0" | ||
Duration="0:0:0.2" /> | ||
</Storyboard> | ||
<Style x:Key="Style.Panel.Description" TargetType="{x:Type StackPanel}"> | ||
<Setter Property="Background" Value="{DynamicResource Brush.Window.Background}" /> | ||
<Setter Property="Grid.Column" Value="2" /> | ||
</Style> | ||
<Style TargetType="{x:Type TextBlock}" x:Key="Style.TextBlock.Description"> | ||
<Setter Property="FontSize" Value="14" /> | ||
<Setter Property="TextWrapping" Value="Wrap" /> | ||
<Setter Property="Margin" Value="10" /> | ||
<Setter Property="Text" Value="{Binding Path=Description, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
</Style> | ||
<Style TargetType="{x:Type TextBlock}" x:Key="Style.TextBlock.Header"> | ||
<Setter Property="FontSize" Value="28" /> | ||
<Setter Property="FontWeight" Value="SemiBold" /> | ||
<Setter Property="Grid.Row" Value="0" /> | ||
<Setter Property="VerticalAlignment" Value="Bottom" /> | ||
<Setter Property="HorizontalAlignment" Value="Left" /> | ||
<Setter Property="Margin" Value="0, 0, 0, 18" /> | ||
<Setter Property="Text" Value="{Binding Path=Header, RelativeSource={RelativeSource TemplatedParent}}" /> | ||
</Style> | ||
<Style TargetType="{x:Type local:ViewSettings}"> | ||
<Setter Property="SnapsToDevicePixels" Value="True" /> | ||
<Setter Property="IsTabStop" Value="False" /> | ||
<Setter Property="Focusable" Value="False" /> | ||
<Setter Property="TextOptions.TextFormattingMode" Value="Display" /> | ||
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" /> | ||
<Setter Property="Background" Value="{DynamicResource Brush.View.Background}" /> | ||
<Setter Property="IsEnabled" Value="{Binding Path=WaitingPanelIsVisible, Converter={StaticResource BoolToInverseBoolConverter}, UpdateSourceTrigger=PropertyChanged}" /> | ||
<Setter Property="Visibility"> | ||
<Setter.Value> | ||
<MultiBinding Converter="{StaticResource TagToVisibilityConverter}"> | ||
<Binding Path="ViewVisibilityByTag" UpdateSourceTrigger="PropertyChanged" /> | ||
<Binding Path="Tag" RelativeSource="{RelativeSource Self}" /> | ||
</MultiBinding> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</UserControl.Resources> | ||
<UserControl.Template> | ||
<ControlTemplate> | ||
<Grid Background="{Binding Path=Background, RelativeSource={RelativeSource TemplatedParent}}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="20" /> | ||
<ColumnDefinition Width="6*" /> | ||
<ColumnDefinition Width="3*" /> | ||
</Grid.ColumnDefinitions> | ||
<Grid Grid.Column="1"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="80" /> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="20" /> | ||
</Grid.RowDefinitions> | ||
<TextBlock Style="{StaticResource Style.TextBlock.Header}" /> | ||
<ScrollViewer x:Name="ScrollViewerContent" Grid.Row="1" BorderBrush="{DynamicResource Brush.Window.Element.Border}"> | ||
<StackPanel> | ||
<controls:DropDownListBox /> | ||
<TextBlock Text="Test" /> | ||
</StackPanel> | ||
</ScrollViewer> | ||
</Grid> | ||
<StackPanel Style="{DynamicResource Style.Panel.Description}"> | ||
<TextBlock Style="{DynamicResource Style.TextBlock.Description}" /> | ||
</StackPanel> | ||
</Grid> | ||
<ControlTemplate.Triggers> | ||
<Trigger Property="Visibility" Value="Visible"> | ||
<Trigger.EnterActions> | ||
<BeginStoryboard Storyboard="{StaticResource Animation.Page.Visible}" /> | ||
</Trigger.EnterActions> | ||
</Trigger> | ||
<Trigger Property="Visibility" Value="Collapsed"> | ||
<Setter Property="Margin" Value="{StaticResource Animation.Page.Margin}" /> | ||
</Trigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</UserControl.Template> | ||
</UserControl> |
Oops, something went wrong.