feat(12-02): add MSP logo section with live preview to SettingsView
- Add Separator and MSP Logo label after data folder section - Add Border with Grid containing Image preview and placeholder TextBlock - Image bound to MspLogoPreview via Base64ToImageConverter with max 80x240 - DataTrigger toggles placeholder visibility when logo is null - Import/Clear buttons bound to BrowseMspLogoCommand/ClearMspLogoCommand - StatusMessage TextBlock in red, visible only when set Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,5 +24,40 @@
|
|||||||
Command="{Binding BrowseFolderCommand}" Width="80" Margin="8,0,0,0" />
|
Command="{Binding BrowseFolderCommand}" Width="80" Margin="8,0,0,0" />
|
||||||
<TextBox Text="{Binding DataFolder, UpdateSourceTrigger=PropertyChanged}" />
|
<TextBox Text="{Binding DataFolder, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
|
<Separator Margin="0,12" />
|
||||||
|
|
||||||
|
<!-- MSP Logo -->
|
||||||
|
<Label Content="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[settings.logo.title]}" />
|
||||||
|
<Border BorderBrush="#DDDDDD" BorderThickness="1" Padding="8" CornerRadius="4"
|
||||||
|
HorizontalAlignment="Left" MinWidth="200" MinHeight="60" Margin="0,4,0,0">
|
||||||
|
<Grid>
|
||||||
|
<Image Source="{Binding MspLogoPreview, Converter={StaticResource Base64ToImageConverter}}"
|
||||||
|
MaxHeight="80" MaxWidth="240" Stretch="Uniform" HorizontalAlignment="Left"
|
||||||
|
Visibility="{Binding MspLogoPreview, Converter={StaticResource StringToVisibilityConverter}}" />
|
||||||
|
<TextBlock Text="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[settings.logo.nopreview]}"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||||
|
Foreground="#999999" FontStyle="Italic">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="Visibility" Value="Visible" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding MspLogoPreview, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="0,6,0,0">
|
||||||
|
<Button Content="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[settings.logo.browse]}"
|
||||||
|
Command="{Binding BrowseMspLogoCommand}" Width="80" Margin="0,0,8,0" />
|
||||||
|
<Button Content="{Binding Source={x:Static loc:TranslationSource.Instance}, Path=[settings.logo.clear]}"
|
||||||
|
Command="{Binding ClearMspLogoCommand}" Width="80" />
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="{Binding StatusMessage}" Foreground="#CC0000" FontSize="11" Margin="0,4,0,0"
|
||||||
|
Visibility="{Binding StatusMessage, Converter={StaticResource StringToVisibilityConverter}}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user