vendredi 29 août 2014

C# Windows Store App : Access function of containing canvas


Vote count:

0




I'm working on a C# metro (store) app which has a UI similar to the following code (as an example) :



<Canvas x:Name="canvas">
<Image x:Name="image" Canvas.Left="600" Canvas.Top="170"/>
</Canvas>


The containing canvas has a function "AddToLog(string text)" and I want this function to be accessible by the objects inside the canvas (i.e. here "image") also. The image may also be a User Control contained in a separate *.xaml file. Is this possible, and if so how would I go about doing it ? If not, are there any alternate ways to do this ?



asked 13 secs ago







C# Windows Store App : Access function of containing canvas

Aucun commentaire:

Enregistrer un commentaire