MERRY XMAS FOR EVERYBODY !!
Im continue testing and working based on FORM editor example, i have my custom button created with some properties correctly handled for be saved in XamlWriter/XamlReader serialization
But what about events?
Im testing with different kinds of events, like touch or mouse events, when the button is created, work perfect, mouseclick event is handled correctly, and button work, when i save and load again, button stop work.
Why?
<Rectangle Fill="Black" RadiusY="5" RadiusX="5" Stroke="White" StrokeThickness="2" Opacity="0.01" MouseLeftButtonDown="Rectangle1" />
XamlWriter/XamlReader serialization provided by mindfusion can save mouse events and other kind of events?
For simple custom components i try this:
this.MouseLeftButtonDown += new EventHandler<MouseEventArgs>(Mouse_down);
Work erfect when node is created, but after save and reload again nto work never again.
In some complex custom controls i build the situation is more complex, example:
<Grid Margin="82,156,188,213">
<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Stroke="Black" Width="74"/>
<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Margin="89,0,0,0" Stroke="Black" Width="74"/>
<Rectangle Fill="#FFF4F4F5" Margin="0,0,99,0" Stroke="Black" HorizontalAlignment="Right" Width="74"/>
<Rectangle Fill="#FFF4F4F5" Stroke="Black" HorizontalAlignment="Right" Width="74"/>
</Grid>
In this example imagine this is the custom component where i need do specic and different things when specific rectangle is clicked.
In this scenario in normal situation i do something like this:
<Grid Margin="0,0,0,0">
<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Stroke="Black" Width="74" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown1"/>
<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Margin="89,0,0,0" Stroke="Black" Width="74" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown2" />
<Rectangle Fill="#FFF4F4F5" Margin="0,0,99,0" Stroke="Black" HorizontalAlignment="Right" Width="74" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown3" />
<Rectangle Fill="#FFF4F4F5" Stroke="Black" HorizontalAlignment="Right" Width="74" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown4" /> </Grid>
I cant find the way to do this with mindfusion. Hoppe you can showme the solution for two situations, please, with code : ) Im very clsoe to test if mindfusion do all what i need, i need sty secure at 100% before complete order.
|