Implemented opening/saving themes
This commit is contained in:
25
Filtration.ThemeEditor/Views/ThemeComponentControl.xaml
Normal file
25
Filtration.ThemeEditor/Views/ThemeComponentControl.xaml
Normal file
@@ -0,0 +1,25 @@
|
||||
<UserControl x:Class="Filtration.ThemeEditor.Views.ThemeComponentControl"
|
||||
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:viewModels="clr-namespace:Filtration.ThemeEditor.ViewModels"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:converters="clr-namespace:Filtration.ThemeEditor.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewModels:ThemeComponentViewModel}"
|
||||
d:DesignHeight="40" d:DesignWidth="200">
|
||||
<UserControl.Resources>
|
||||
<converters:ThemeComponentTypeToStringConverter x:Key="ThemeComponentTypeToStringConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid Width="200">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="25" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding ComponentType, Converter={StaticResource ThemeComponentTypeToStringConverter}}" Foreground="Red" FontSize="10" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding ComponentName}" />
|
||||
<xctk:ColorPicker Grid.Row="2" Grid.Column="0" SelectedColor="{Binding Color}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace Filtration.ThemeEditor.Views
|
||||
{
|
||||
public partial class ThemeEditorView
|
||||
public partial class ThemeComponentControl
|
||||
{
|
||||
public ThemeEditorView()
|
||||
public ThemeComponentControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
27
Filtration.ThemeEditor/Views/ThemeControl.xaml
Normal file
27
Filtration.ThemeEditor/Views/ThemeControl.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<UserControl x:Class="Filtration.ThemeEditor.Views.ThemeControl"
|
||||
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:viewModels="clr-namespace:Filtration.ThemeEditor.ViewModels"
|
||||
xmlns:views="clr-namespace:Filtration.ThemeEditor.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewModels:ThemeViewModel}"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
|
||||
<ItemsControl ItemsSource="{Binding Components}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<views:ThemeComponentControl DataContext="{Binding}" Margin="10" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
Filtration.ThemeEditor/Views/ThemeControl.xaml.cs
Normal file
28
Filtration.ThemeEditor/Views/ThemeControl.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Filtration.ThemeEditor.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ThemeControl.xaml
|
||||
/// </summary>
|
||||
public partial class ThemeControl : UserControl
|
||||
{
|
||||
public ThemeControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<UserControl x:Class="Filtration.ThemeEditor.Views.ThemeEditorView"
|
||||
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:viewModels="clr-namespace:Filtration.ThemeEditor.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=viewModels:ThemeEditorViewModel}"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<TextBlock>theme editor goes here!</TextBlock>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user