add uid loading support

This commit is contained in:
TheXamlGuy
2024-01-27 20:28:40 +00:00
parent 640b3292b2
commit 9f6cc35bc1
23 changed files with 147 additions and 99 deletions
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<UserControl
x:Class="Hyperbar.Widget.Windows.WidgetContainerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:ui="using:Hyperbar.UI.Windows">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle
Width="1"
Height="40"
Margin="6,2,6,2"
Fill="Red" />
<ItemsControl
Grid.Column="1"
ItemTemplateSelector="{Binding Converter={ui:DataTemplateConverter}}"
ItemsSource="{Binding}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Loaded">
<interactions:InvokeCommandAction Command="{Binding Initialize}" />
</interactions:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</ItemsControl>
</Grid>
</UserControl>