Bonjour à tous,
Mon problème étant que je n'arrive pas à appeler mon Canvas à partir de mon xaml.cs
Code xaml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 <s:ScatterView x:Name="ScatterView" > <s:ScatterViewItem x:Name="origin" Width="500" Height="500" Center="700,540" Orientation="0" CanMove="False" CanRotate="True" HorizontalAlignment="Center" VerticalAlignment="Center"> <s:ScatterViewItem.Background> <ImageBrush ImageSource="{Binding ImagePlan}" Stretch="Fill"/> </s:ScatterViewItem.Background> <ListBox x:Name="ListBoxPlan" SelectionChanged="ListBoxPlan_SelectionChanged" ItemContainerStyle="{StaticResource MyListBoxItemContainerStyle}" Background="{x:Null}" Width="500" Height="500" ItemsSource="{Binding Media}" SelectedItem="{Binding SelectedMedia}" Margin="0"> <ListBox.ItemsPanel > <ItemsPanelTemplate > <Canvas x:Name="CanvasPlan" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> </s:ScatterViewItem> <s:ScatterViewItem x:Name="destination" ContainerStaysActive="True" Center="150,150" Orientation="0" Visibility="{Binding VisibilityScatter}" Width="{Binding WidthScatter}" Height="{Binding HeightScatter}"> <MediaElement Volume="0" Source="{Binding SelectedMedia.Chemin}" Stretch="Fill"/> </s:ScatterViewItem> </s:ScatterView>
j'aimerai pouvoir appeler le "CanvasPlan" dans mon xaml.cs.
Partager