2.9 KiB
2.9 KiB
Phase 12 Research: Branding UI Views
What Exists (Phase 11 Deliverables)
SettingsViewModel (already complete)
BrowseMspLogoCommand(IAsyncRelayCommand) — opens file dialog, imports via IBrandingService, saves, updates previewClearMspLogoCommand(IAsyncRelayCommand) — clears via IBrandingService, nulls previewMspLogoPreview(string?) — data URI formatdata:{mime};base64,{b64}, set on load and after browse/clearStatusMessage— inherited from FeatureViewModelBase, set on error
ProfileManagementViewModel (already complete)
BrowseClientLogoCommand— opens file dialog, imports, persists to profileClearClientLogoCommand— nulls ClientLogo, persistsAutoPullClientLogoCommand— fetches from Entra branding API, persistsValidationMessage— set on error or success feedback- GAP: No
ClientLogoPreviewstring property — SelectedProfile.ClientLogo is a LogoData object, NOT a data URI string. TenantProfile is not ObservableObject, so binding to SelectedProfile.ClientLogo won't notify UI on change.
SettingsView.xaml (NO logo UI)
- Current: Language combo + Data folder text+browse — that's it
- Need: Add MSP logo section with Image preview, Browse, Clear buttons
ProfileManagementDialog.xaml (NO logo UI)
- Current: Profile ListBox, Name/URL/ClientId fields, Add/Rename/Delete/Close buttons
- Window: 500x480, NoResize
- Need: Add client logo section with Image preview, Browse, Clear, Auto-Pull buttons; resize dialog
Infrastructure Gaps
No Image Converter
MspLogoPreviewis a data URI string — WPF<Image Source=...>does NOT natively bind to data URI strings- Need
Base64ToImageSourceConverterIValueConverter: parse data URI → decode base64 → create BitmapImage from byte stream - Register in App.xaml as global resource
Localization Keys Missing
- No keys for logo UI labels/buttons in Strings.resx / Strings.fr.resx
- Need:
settings.logo.msp,settings.logo.browse,settings.logo.clear,profile.logo.client,profile.logo.browse,profile.logo.clear,profile.logo.autopull,logo.nopreview
Available Patterns
Converters
- Live in
SharepointToolbox/Views/Converters/(IndentConverter.cs has multiple converters) - Registered in App.xaml under
<Application.Resources> StringToVisibilityConverteralready exists — can show/hide preview based on non-null string
XAML Layout
- SettingsView uses
<StackPanel>with<Separator>between sections - ProfileManagementDialog uses
<Grid>with row definitions - Buttons:
<Button Content="{Binding Source=...}" Command="{Binding ...}" Width="60" Margin="4,0" />
Plan Breakdown
- 12-01: Base64ToImageSourceConverter + localization keys + App.xaml registration + ClientLogoPreview ViewModel property
- 12-02: SettingsView.xaml MSP logo section
- 12-03: ProfileManagementDialog.xaml client logo section + dialog resize