mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 00:21:33 -07:00
* add custom bootstrappers * add avalonedit to licenses page * add gif support * add stretch & stretchdirection to images * dont create a bitmapimage for gifs * remove maxheight and maxwidth sets * remove comment * add isenabled * add more textblock properties * add markdowntextblocks * update how transform elements are stored * overhaul textbox content * dont set fontsize if not set * fix warnings * add foreground property to control * add background property to textblock * count descendants and increase element cap * add auto complete * dont display completion window if there is no data * sort schema elements and types * make ! close the completion window * add end tag auto complete * fix pos being wrong * dont treat comments as elements * add imagebrushes * follow same conventions as brushes * fix exception messages * fix them again * update schema * fix crash * now it works * wrong attribute name * add solidcolorbrush * move converters into a separate file * add lineargradientbrushes * unify handlers * update schema * add fake BloxstrapCustomBootstrapper * stop adding an extra end character * add property element auto-complete * add title attribute to custombloxstrapbootstrapper * add shapes * add string translation support * use default wpf size instead of 100x100 * update min height of window * fix verticalalignment not working * uncap height and width * add effects * move transformation handler inside frameworkelement * fix title bar effect & transformation removal * add more frameworkelement properties * add layout transform * add font properties to control * improve window border stuff * make sure file contents are in CRLF * add cornerradius to progress bar * add progressring * Update wpfui * update schema * update function names * add children check to content * make sure only one content is defined * add fontfamily * update schema * only allow file uris for images * disable backdrop * move text setter to textblock handler from base * split up creator into multiple files * turn version into a constant * add grids * cleanup converters * add IgnoreTitleBarInset * add Version to schema * reveal custom bootstrapper stuff on selection * increase listbox height * only set statustext binding in textblock * update ui * rename ZIndex to Panel.ZIndex * add stackpanel * add border * fix being unable to apply transforms on grids * rearrange and add new editor button * use snackbars for saving * add close confirmation message * use viewmodel variable * remove pointless onpropertychanged call * add version string format * start editor window in the centre * update licenses page also resized the about window so everything could fit nicely * fix border not inheriting frameworkelement * add WindowCornerPreference * add the import dialog * add an export theme button * update version number * localise CustomDialog exceptions * localise custom theme editor * localise custom theme add dialog * localise frontend * localise appearance menu page * change customtheme error strings namespace * change icons on appearance page * update button margin on appearance page
166 lines
7.4 KiB
XML
166 lines
7.4 KiB
XML
<base:WpfUiWindow
|
|
x:Class="Bloxstrap.UI.Elements.Dialogs.AddCustomThemeDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Dialogs"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:resources="clr-namespace:Bloxstrap.Resources"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
xmlns:viewmodels="clr-namespace:Bloxstrap.UI.ViewModels.Dialogs"
|
|
Title="Add Custom Theme"
|
|
Width="480"
|
|
MinHeight="0"
|
|
d:DataContext="{d:DesignInstance viewmodels:AddCustomThemeViewModel,
|
|
IsDesignTimeCreatable=True}"
|
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
|
ExtendsContentIntoTitleBar="True"
|
|
ResizeMode="NoResize"
|
|
SizeToContent="Height"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
<Grid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:TitleBar
|
|
Title="{x:Static resources:Strings.CustomTheme_Add_Title}"
|
|
Grid.Row="0"
|
|
Grid.ColumnSpan="2"
|
|
Padding="8"
|
|
CanMaximize="False"
|
|
KeyboardNavigation.TabNavigation="None"
|
|
ShowMaximize="False"
|
|
ShowMinimize="False" />
|
|
|
|
<TabControl
|
|
x:Name="Tabs"
|
|
Grid.Row="1"
|
|
Margin="16"
|
|
SelectedIndex="{Binding Path=SelectedTab, Mode=TwoWay}">
|
|
<TabItem Header="{x:Static resources:Strings.Common_CreateNew}">
|
|
<Grid Grid.Row="1" Margin="16">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid
|
|
Grid.Row="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="0,0,0,12">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
MinWidth="100"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resources:Strings.Common_Name}" />
|
|
<TextBox
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Text="{Binding Path=Name, Mode=TwoWay}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Foreground="{DynamicResource SystemFillColorCriticalBrush}"
|
|
Text="{Binding Path=NameError, Mode=OneWay}"
|
|
TextAlignment="Center"
|
|
TextWrapping="Wrap"
|
|
Visibility="{Binding Path=NameErrorVisibility, Mode=OneWay}" />
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
MinWidth="100"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resources:Strings.Common_Template}" />
|
|
|
|
<ComboBox
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
ItemsSource="{Binding Path=Templates, Mode=OneTime}"
|
|
Text="{Binding Path=Template, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=., Converter={StaticResource EnumNameConverter}}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="{x:Static resources:Strings.Common_Import}">
|
|
<Grid Margin="11">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
FontSize="14"
|
|
Text="{Binding Path=FilePath}"
|
|
TextAlignment="Center"
|
|
TextWrapping="Wrap"
|
|
Visibility="{Binding Path=FilePathVisibility}" />
|
|
<ui:Button
|
|
Grid.Row="1"
|
|
Margin="4"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnImportButtonClicked"
|
|
Content="{x:Static resources:Strings.Common_ImportFromFile}"
|
|
Icon="DocumentArrowUp16" />
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Foreground="{DynamicResource SystemFillColorCriticalBrush}"
|
|
Text="{Binding Path=FileError}"
|
|
TextAlignment="Center"
|
|
TextWrapping="Wrap"
|
|
Visibility="{Binding Path=FileErrorVisibility}" />
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
|
|
<Border
|
|
Grid.Row="2"
|
|
Margin="0,10,0,0"
|
|
Padding="15"
|
|
Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}">
|
|
<StackPanel
|
|
HorizontalAlignment="Right"
|
|
FlowDirection="LeftToRight"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
MinWidth="100"
|
|
Click="OnOkButtonClicked"
|
|
Content="{x:Static resources:Strings.Common_OK}" />
|
|
<Button
|
|
MinWidth="100"
|
|
Margin="12,0,0,0"
|
|
Content="{x:Static resources:Strings.Common_Cancel}"
|
|
IsCancel="True" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</base:WpfUiWindow>
|